/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2rem;
    color: #4a5568;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card h2 i {
    color: #667eea;
    font-size: 1.5rem;
}

/* Compatibility Section */
.compatibility-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f8ff 100%);
    border-radius: 12px;
    border: 2px solid #667eea;
}

.device-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.device-info i {
    font-size: 2rem;
    color: #667eea;
}

/* Download Section */
/* Progress Container */
.progress-container {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 2px solid #667eea;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    opacity: 0;
    transition: all 0.3s ease;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.progress-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.download-status {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    color: #4a5568;
    background: rgba(255, 255, 255, 0.7);
}

.download-status.success {
    color: #22543d;
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
}

.download-status.error {
    color: #742a2a;
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
}

.download-status.cancelled {
    color: #744210;
    background: linear-gradient(135deg, #faf089 0%, #f6e05e 100%);
}

.progress-bar-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
}

/* Device Detection Notices */
.mobile-notice, .desktop-notice {
    margin-bottom: 25px;
}

.mobile-device-detected, .desktop-device-detected, .pixel-device-detected {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid;
}

.mobile-device-detected {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    border-color: #38b2ac;
    color: #234e52;
}

.desktop-device-detected {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border-color: #4a5568;
    color: #2d3748;
}

.pixel-device-detected {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    border-color: #ed8936;
    color: #744210;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.pixel-device-detected ul {
    margin: 10px 0 0 20px;
    color: #744210;
}

.pixel-device-detected li {
    margin-bottom: 8px;
}

.mobile-device-detected i, .desktop-device-detected i, .pixel-device-detected i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mobile-device-detected i {
    color: #38b2ac;
}

.desktop-device-detected i {
    color: #4a5568;
}

.pixel-device-detected i {
    color: #ed8936;
}

.download-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.download-options.mobile-layout {
    grid-template-columns: 1fr;
}

/* Alternative Download Option */
.alternative-option {
    grid-column: span 2;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
}

.download-option {
    text-align: center;
}

.download-option h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.download-btn:active {
    transform: translateY(0);
}

/* Button State Variations */
.download-btn.cancel-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4);
}

.download-btn.cancel-btn:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    box-shadow: 0 6px 25px rgba(229, 62, 62, 0.6);
}

.download-btn.success-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.download-btn.error-btn {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.4);
}

.download-btn.alternative-btn {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 4px 15px rgba(74, 85, 104, 0.4);
}

.download-btn.alternative-btn:hover {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    box-shadow: 0 6px 25px rgba(74, 85, 104, 0.6);
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#qrcode {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.generate-qr-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generate-qr-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.download-info {
    margin-top: 15px;
    color: #4a5568;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apk-info {
    display: flex;
    justify-content: space-around;
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-weight: 500;
}

.info-item i {
    color: #667eea;
}

/* Warning Box */
.warning-box {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border: 2px solid #fc8181;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.warning-box i {
    color: #c53030;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-box strong {
    color: #c53030;
}

/* Steps Container */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.step {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.step:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.step-content p {
    color: #4a5568;
    margin-bottom: 10px;
}

.step-content strong {
    color: #2d3748;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
}

.sub-steps {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.sub-steps ul {
    margin-left: 20px;
    margin-top: 10px;
}

.sub-steps li {
    color: #4a5568;
    margin-bottom: 5px;
}

/* Troubleshooting Section */
.faq-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 4px solid #48bb78;
}

.faq-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.faq-item ul {
    margin-left: 20px;
    margin-top: 10px;
}

.faq-item li {
    color: #4a5568;
    margin-bottom: 5px;
}

.faq-item strong {
    color: #2d3748;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Security Section */
.security-card {
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    border: 2px solid #48bb78;
}

.security-content p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #2f855a;
    font-weight: 500;
}

.security-content i {
    color: #48bb78;
    font-size: 1.2rem;
}

/* Password Protection Overlay */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.password-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 450px;
    width: 90%;
    text-align: center;
}

.password-header {
    margin-bottom: 30px;
}

.password-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
    display: block;
}

.password-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.password-header p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
}

.password-form {
    margin-bottom: 25px;
}

#passwordInput {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    transition: all 0.3s ease;
}

#passwordInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
}

.password-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.password-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.password-btn:active {
    transform: translateY(0);
}

.password-error {
    color: #e53e3e;
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #fc8181;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.password-footer {
    color: #4a5568;
    font-size: 0.9rem;
}

.password-footer i {
    color: #667eea;
    margin-right: 5px;
}

/* Shake Animation */
@keyframes shake {
    0%, 20%, 40%, 60%, 80%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
}

/* QR Loading State */
.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #4a5568;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: rgba(247, 250, 252, 0.5);
}

.qr-loading i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.qr-loading p {
    font-size: 0.9rem;
    color: #4a5568;
    margin: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .header-content {
        padding: 30px 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .download-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .alternative-option {
        grid-column: span 1;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .mobile-device-detected, .desktop-device-detected, .pixel-device-detected {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .pixel-device-detected {
        text-align: left;
    }
    
    .apk-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .step-number {
        align-self: center;
    }
    
    .compatibility-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.7rem;
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
    
    .download-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .warning-box {
        flex-direction: column;
        text-align: center;
    }
    
    /* Password overlay mobile styles */
    .password-container {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .password-header h2 {
        font-size: 1.5rem;
    }
    
    .password-header i {
        font-size: 2.5rem;
    }
}
