/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #0A2342;
    --accent-color: #0082CA;
    --accent-hover: #006BA6;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --bg-light: #F9FAFB;
    --error-color: #EF4444;
    --success-color: #10B981;
    --border-color: #E5E7EB;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--primary-color);
}

/* Required Hidden Class */
.hidden {
    display: none !important;
}

/* Text Utilities */
.text-center { text-align: center; }

/* Backgrounds & Overlays */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 35, 66, 0.85) 0%, rgba(0, 130, 202, 0.6) 100%);
    z-index: 1;
}

/* Layout */
.layout-wrapper {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
}

.main-content {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Header styling */
.header-section {
    color: #ffffff;
    animation: fadeDown 0.6s ease-out;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: #E0F2FE;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin: 0 auto;
}

/* Announcement Box */
.announcement-box {
    background: #038599;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 16px 24px;
    text-align: center;
    max-width: 480px;
    margin: -12px auto 0;
    width: 100%;
    animation: fadeUp 0.6s ease-out 0.1s both;
}

.announcement-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.announcement-date {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}


/* Glass Card Content */
.glass-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeUp 0.6s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

/* Forms */
.form-row {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-group input:not([type="checkbox"]),
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.form-group input:not([type="checkbox"]):focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 130, 202, 0.1);
}

/* Checkbox & Terms Link */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--accent-color);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-main);
    line-height: 1.4;
}

.checkbox-group label a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.checkbox-group label a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #0096E8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 130, 202, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 130, 202, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 12px 20px;
    background-color: var(--bg-light);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #E5E7EB;
}

/* Error/Status Alerts */
.error-alert {
    background-color: #FEF2F2;
    color: var(--error-color);
    padding: 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid #FECACA;
}

.status-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.status-desc {
    color: var(--text-muted);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

/* Success State */
.success-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #D1FAE5;
    color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon {
    width: 32px;
    height: 32px;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.success-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* Share Panel */
.share-panel {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-top: 32px;
    position: relative;
}

.share-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.05em;
}

.share-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.share-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.share-input-group {
    display: flex;
    gap: 8px;
}

.share-input-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
    color: var(--text-main);
    font-family: monospace;
    font-size: 0.9rem;
}

.copy-toast {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--success-color);
    font-weight: 500;
}

/* Terms Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-container {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeUp 0.3s ease-out;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--error-color);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 0.95rem;
    color: var(--text-main);
}

.modal-body p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.modal-body h4 {
    margin-top: 24px;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--primary-color);
}

.modal-body a {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Powered By Element */
#wbx-powered-by-slot {
    margin-top: auto;
    padding-top: 24px;
}

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

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

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 640px) {
    .glass-card {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .page-title {
        font-size: 2.25rem;
    }
    
    .share-input-group {
        flex-direction: column;
    }
    
    .share-input-group button {
        width: 100%;
    }
    
    .modal-container {
        max-height: 95vh;
    }
}
