* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e0e0e0;
    padding: 40px 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

header p {
    color: #a0a0a0;
    font-size: 1.1rem;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.alert code {
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.form-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.form-section h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 600;
}

.file-group, .input-group {
    margin-bottom: 20px;
}

.file-group label, .input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #d0d0d0;
    font-size: 0.95rem;
}

input[type="file"] {
    display: none;
}

.file-group input[type="file"] + label,
.file-group label + input[type="file"] {
    display: inline-block;
}

/* Style the label that triggers file input */
.file-group label:first-of-type {
    cursor: pointer;
}

/* Custom file input styling via JS */
.file-group {
    position: relative;
}

.file-group input[type="file"] {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-group input[type="file"]:hover {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.05);
}

.file-name {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #e94560;
    background: rgba(0, 0, 0, 0.3);
}

input::placeholder {
    color: #666;
}

small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 0.8rem;
}

button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e94560, #c73e54);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.3);
}

button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.result-box, .error-box {
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.result-box {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.result-box h3 {
    color: #28a745;
    margin-bottom: 12px;
}

.error-box {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.error-box h3 {
    color: #dc3545;
    margin-bottom: 12px;
}

.download-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

footer {
    text-align: center;
    margin-top: 40px;
    color: #666;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    .form-section {
        padding: 20px;
    }
}


.expire-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffc107;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 16px 0;
    font-size: 0.95rem;
}

.expire-warning strong {
    color: #ffca2c;
}


.action-buttons {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.install-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #007aff, #0051d5);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

.install-instructions {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.install-instructions p {
    color: #d0d0d0;
    margin-bottom: 12px;
}

.install-instructions ol {
    color: #b0b0b0;
    padding-left: 20px;
    margin-bottom: 12px;
}

.install-instructions li {
    margin-bottom: 6px;
}

.install-instructions .note {
    color: #ffc107;
    font-size: 0.9rem;
    font-style: italic;
}
