/* Jupiter Portal — Public Styles
   Matches Jupiter Institute dark glassmorphism theme */

:root {
    --bg-black: #000000;
    --bg-navy: #00243d;
    --brand-red: #ed1c24;
    --brand-blue: #1c75bc;
    --text-light: #f0f4f8;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-black);
    color: var(--text-light);
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(28, 117, 188, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, rgba(237, 28, 36, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 20% 50%, rgba(28, 117, 188, 0.04) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: bgShift 20s ease infinite;
}

/* Header */
.site-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    height: 56px;
    width: auto;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.02em;
}

.logo-text span {
    color: var(--brand-red);
}

/* Container */
.container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Cards / Glass panels */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2.5rem;
}

.glass-card h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.glass-card .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Form elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-light);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(28, 117, 188, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-group select option {
    background: #111827;
    color: var(--text-light);
}

.form-group input[type="file"] {
    padding: 0.5rem;
    font-size: 0.875rem;
}

.form-group input[type="file"]::file-selector-button {
    background: var(--brand-blue);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    margin-right: 0.75rem;
    transition: background 0.2s;
}

.form-group input[type="file"]::file-selector-button:hover {
    background: #155d9b;
}

.form-group .file-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 2rem;
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    background: #d4181f;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(237, 28, 36, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Alert messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-error {
    background: rgba(237, 28, 36, 0.1);
    border: 1px solid rgba(237, 28, 36, 0.3);
    color: #f87171;
}

.alert-info {
    background: rgba(28, 117, 188, 0.1);
    border: 1px solid rgba(28, 117, 188, 0.3);
    color: #60a5fa;
}

/* Loading spinner */
.spinner {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner.show {
    display: inline-block;
}

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

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

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--brand-blue);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 3rem;
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer a:hover {
    color: var(--brand-blue);
}

/* Modal overlay (shared with success modal) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.modal-overlay.show {
    display: flex;
}

.modal-card {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    width: 90%;
    animation: scaleIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.success-check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.5s ease 0.15s both;
}

.modal-card .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}
.modal-card .btn-primary:hover {
    background: #d4181f;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(237, 28, 36, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .glass-card {
        padding: 1.5rem;
    }
    .glass-card h1 {
        font-size: 1.5rem;
    }
    .header-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
}
