/**
 * Event Registration System - Modern UI Design
 * Glassmorphism + Modern Gradients + Smooth Animations
 * Font: Google Font 'Prompt'
 */

/* ==================== CSS Variables ==================== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gold-gradient: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 8px 32px rgba(31, 38, 135, 0.15);
    --shadow-hover: 0 12px 40px rgba(31, 38, 135, 0.25);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #8b8b9e;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Global Styles ==================== */

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

body {
    font-family: 'Prompt', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    /* Default background - will be overridden by event theme via JavaScript */
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 50%, #f5f7fa 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== Navbar ==================== */

.navbar {
    padding: 1rem 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--glass-bg) !important;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    z-index: 1000;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.35rem;
    font-weight: 700;
    transition: var(--transition);
}

.navbar-brand .navbar-title {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 8px rgba(0, 0, 0, 0.3);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-logo {
    height: 36px;
    width: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    padding: 0.6rem 1.2rem !important;
    transition: var(--transition);
    border-radius: 50px;
    margin: 0 0.25rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
    border-radius: 50px;
}

.nav-link:hover {
    color: white !important;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link.active {
    color: white !important;
    background: var(--primary-gradient);
}

.navbar-toggler {
    padding: 0.5rem;
    font-size: 1.25rem;
    border: none;
    background: var(--primary-gradient);
    border-radius: var(--border-radius-sm);
    color: white;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ==================== Mobile Menu ==================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.mobile-menu-header h5 {
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-menu:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: rotate(90deg);
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    margin-bottom: 0.75rem;
}

.mobile-menu-list a {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.mobile-menu-list a i {
    margin-right: 1rem;
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.mobile-menu-list a:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(5px);
}

/* ==================== Page Content ==================== */

.page-content {
    padding-top: 100px;
    padding-bottom: 50px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    background: transparent;
}
}

/* ==================== Cards (Glassmorphism) ==================== */

.card,
.event-card,
.registration-form,
.success-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover,
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* ==================== Event Card ==================== */

.event-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6); }
}

.event-badge i {
    margin-right: 0.5rem;
}

.event-title {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.event-meta-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 50px;
    transition: var(--transition);
}

.event-meta-item:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.event-meta-item i {
    margin-right: 0.6rem;
    color: #667eea;
    font-size: 1.1rem;
}

.event-icon {
    font-size: 5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
}

.event-detail {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    line-height: 1.9;
}

/* ==================== Registration Form ==================== */

.registration-form {
    animation: slideUp 0.6s ease-out 0.2s both;
}

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

.form-title {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-title i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid;
    border-image: var(--primary-gradient) 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: white;
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ==================== Radio Group (Modern Cards) ==================== */

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 600;
    min-height: 120px;
}

.radio-option label i {
    font-size: 2rem;
    color: #667eea;
    transition: var(--transition);
}

.radio-option label span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.radio-option input[type="radio"]:checked + label {
    border-color: transparent;
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.radio-option input[type="radio"]:checked + label i,
.radio-option input[type="radio"]:checked + label span {
    color: white;
}

.radio-option label:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

/* ==================== Star Rating (Modern) ==================== */

.rating-container {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(240, 147, 251, 0.08) 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.star-rating {
    display: inline-flex;
    gap: 0.75rem;
    font-size: 3.5rem;
}

.star {
    color: rgba(102, 126, 234, 0.2);
    cursor: pointer;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.star:hover,
.star.active,
.star.hover {
    color: #fbbf24;
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.5));
}

.star.active {
    animation: star-pop 0.4s ease;
}

@keyframes star-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4) rotate(10deg); }
    100% { transform: scale(1.2) rotate(5deg); }
}

.rating-text {
    margin-top: 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    min-height: 30px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.rating-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== Submit Button (Modern) ==================== */

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 50px;
    padding: 1rem 3rem;
    font-weight: 600;
    font-size: 1.15rem;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.btn-primary:hover::before {
    left: 100%;
}

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

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    border-radius: 50px;
    padding: 0.9rem 2.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

/* ==================== Success Card ==================== */

.success-card {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

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

.success-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
}

.success-image-simple {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    object-position: center;
    display: block;
    animation: fadeIn 0.6s ease;
}

.success-icon {
    font-size: 6rem;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bounce-in 0.8s ease;
}

@keyframes bounce-in {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.registration-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(240, 147, 251, 0.08) 100%);
    padding: 1.75rem;
    border-radius: var(--border-radius);
    margin-top: 0;
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.registration-info h5 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.registration-info p {
    color: var(--text-secondary);
    line-height: 1.9;
}

/* Success Footer Area */
#shareButtonsContainer,
#successMessageFooter {
    padding: 1rem;
    margin: 0.5rem auto;
    max-width: 500px;
}

#successMessageFooter {
    padding-bottom: 2rem;
}

/* ==================== Footer ==================== */

.footer {
    background: #f8f9fa;
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.footer-caption {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #6c757d;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    color: #667eea;
    font-size: 1.25rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.footer-copyright {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ==================== Animations ==================== */

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

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

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

/* ==================== Responsive Design ==================== */

@media (max-width: 768px) {
    .page-content {
        padding-top: 80px;
    }

    .navbar-logo {
        height: 32px;
    }

    .event-title {
        font-size: 1.75rem;
    }

    .event-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .event-meta-item {
        width: fit-content;
    }

    .event-icon {
        font-size: 3.5rem;
        margin-top: 1rem;
    }

    .radio-group {
        grid-template-columns: 1fr 1fr;
    }

    .radio-option label {
        padding: 1rem;
        min-height: 100px;
    }

    .radio-option label i {
        font-size: 1.5rem;
    }

    .star-rating {
        font-size: 2.5rem;
    }

    .btn-primary {
        width: 100%;
        padding: 1rem 2rem;
    }

    .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }

    .footer {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .event-title {
        font-size: 1.5rem;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .star-rating {
        font-size: 2rem;
        gap: 0.5rem;
    }

    .rating-container {
        padding: 1.5rem;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }
}

/* ==================== Utilities ==================== */

.shadow-sm {
    box-shadow: var(--shadow-soft) !important;
}

.shadow-hover:hover {
    box-shadow: var(--shadow-hover) !important;
}

/* Loading State */
#loadingState {
    animation: fadeIn 0.3s ease;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Invalid Feedback */
.invalid-feedback {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #ef4444;
    font-weight: 500;
}

.is-invalid ~ .invalid-feedback,
.is-invalid .invalid-feedback {
    display: block;
}

.is-invalid {
    border-color: #ef4444 !important;
}

/* ==================== Scrollbar ==================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* ==================== Selection ==================== */

::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}
