/* Authentication page styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #0b3b5a 35%, #0b6a73 70%, #0f172a 100%);
    background-size: 300% 300%;
    animation: authGradientShift 18s ease-in-out infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes authGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-card {
    background: #0f172a;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    text-align: center;
}

.auth-header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 14px;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    height: 96px;
    overflow: hidden;
}

.auth-logo-img {
    width: 100%;
    height: auto;
    display: block;
    clip-path: inset(15%);
    transform: scale(1.45);
    transform-origin: center;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    margin-bottom: 30px;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
}

.form-group input:focus {
    outline: none;
    border-color: #2bb3c0;
    box-shadow: 0 0 0 3px rgba(43, 179, 192, 0.18);
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.form-actions {
    margin-top: 30px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2bb3c0 0%, #1f6feb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(31, 111, 235, 0.25);
}

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

.auth-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.auth-footer p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95em;
}

.auth-footer a {
    color: #7dd3fc;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #f44336;
    font-size: 0.9em;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #4caf50;
    font-size: 0.9em;
}

.key-info {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.key-info-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.key-type {
    font-weight: 500;
    color: #333;
}

.key-valid {
    color: #4caf50;
    font-size: 0.9em;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 2em;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeIn 0.5s ease-out;
}

/* Validation styles */
.form-group input:invalid {
    border-color: #f44336;
}

.form-group input:valid {
    border-color: #4caf50;
}

/* Loading styles */
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: none;
}

.eula-row {
    margin-top: 10px;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: #1f6feb;
    cursor: pointer;
    font-weight: 500;
    text-decoration: underline;
}

.btn-link:hover {
    opacity: 0.9;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 20px;
    z-index: 9999;
}

.modal {
    width: min(900px, 96vw);
    max-height: min(80vh, 720px);
    background: #0f172a;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-title {
    font-size: 1.05em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
}

.modal-body {
    padding: 0;
    overflow: auto;
    background: #0f172a;
}

.eula-text {
    margin: 0;
    padding: 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
}

.modal-footer {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
}

.eula-accept {
    display: flex;
    gap: 10px;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95em;
}



