/* Enhanced Loading Screen and Logo Integration Styles */

/* Enhanced Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.loading-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Logo Section */
.loading-logo-section {
    margin-bottom: 3rem;
}

.main-logo {
    margin-bottom: 1.5rem;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.logo-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.5));
    transition: all 0.3s ease;
}

@keyframes logoGlow {
    from {
        filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.5));
        transform: scale(1);
    }
    to {
        filter: drop-shadow(0 0 30px rgba(34, 197, 94, 0.8));
        transform: scale(1.02);
    }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(45deg, #10b981, #22d3ee);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.brand-subtitle {
    font-size: 1.25rem;
    color: #e2e8f0;
    margin: 0.5rem 0;
    font-weight: 500;
}

.brand-tagline {
    font-size: 1rem;
    color: #94a3b8;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 50px;
    background: rgba(34, 197, 94, 0.1);
    display: inline-block;
}

/* Features Preview */
.features-preview {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.5rem;
    min-width: 2rem;
}

.feature-item span {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 500;
}

/* Benefits Section */
.benefits-section {
    margin: 2rem 0;
    text-align: left;
}

.benefits-section h3 {
    color: #22d3ee;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.benefits-list li i {
    color: #22c55e;
    font-size: 1rem;
}

/* Enhanced Loading Animation */
.loading-animation {
    margin: 2rem 0;
}

.loading-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(45deg, #10b981, #22d3ee);
    border-radius: 3px;
    width: 0%;
    animation: loadingProgress 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loading-status {
    margin-top: 1rem;
}

.loading-text {
    display: block;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.step {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
}

.step.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Loading Footer */
.loading-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.service-info {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.carbon-info {
    color: #22c55e;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    font-weight: 500;
}

/* Language Screen Logo */
.language-header {
    text-align: center;
    margin-bottom: 2rem;
}

.language-logo {
    margin-bottom: 1.5rem;
}

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(34, 197, 94, 0.3));
}

/* Navigation Logo Integration */
.app-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.app-logo:hover {
    transform: translateY(-1px);
}

.nav-logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.2));
}

.nav-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #10b981;
    margin: 0;
}

.nav-brand-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .loading-content {
        padding: 1rem;
        max-width: 90%;
    }
    
    .logo-image {
        width: 100px;
        height: 100px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .feature-item {
        padding: 0.5rem;
    }
    
    .benefits-list li {
        font-size: 0.85rem;
    }
    
    .loading-steps {
        gap: 0.25rem;
    }
    
    .step {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 1.75rem;
    }
    
    .logo-image {
        width: 80px;
        height: 80px;
    }
    
    .features-preview {
        padding: 1rem;
    }
    
    .feature-item {
        gap: 0.5rem;
    }
    
    .feature-icon {
        font-size: 1.25rem;
        min-width: 1.5rem;
    }
}

/* Header and Navigation Integration */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo-image {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.3));
}

.header-brand {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
    line-height: 1.2;
    margin: 0;
}

.header-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

/* Sidebar logo for mobile */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-logo-image {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.sidebar-brand-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #10b981;
}

/* Footer logo integration */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(0.8);
}

.footer-brand-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

/* Loading screen step animation */
.loading-steps .step {
    animation-delay: calc(var(--step-index, 0) * 0.5s);
}

.step[data-step="1"] { --step-index: 0; }
.step[data-step="2"] { --step-index: 1; }
.step[data-step="3"] { --step-index: 2; }
.step[data-step="4"] { --step-index: 3; }

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .logo-image,
    .loading-progress,
    .step {
        animation: none;
    }
    
    .feature-item:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .loading-screen {
        background: #000;
        color: #fff;
    }
    
    .brand-title {
        -webkit-text-fill-color: #22c55e;
    }
    
    .feature-item,
    .benefits-section {
        border: 1px solid #22c55e;
    }
}