/* Samsung Galaxy CI Colors and Variables */
:root {
    --samsung-blue: #1428a0;
    --samsung-blue-light: #4169e1;
    --samsung-blue-dark: #0d1b69;
    --samsung-black: #000000;
    --samsung-white: #ffffff;
    --samsung-gray-100: #f7f7f7;
    --samsung-gray-200: #e8e8e8;
    --samsung-gray-300: #c9c9c9;
    --samsung-gray-600: #6e6e6e;
    --samsung-gray-800: #2c2c2c;
    --samsung-gradient: linear-gradient(135deg, #1428a0 0%, #4169e1 50%, #7b68ee 100%);
    --samsung-gradient-dark: linear-gradient(180deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    --accent-purple: #7b68ee;
    --accent-cyan: #00d4ff;
    --error-red: #e53935;
    --success-green: #43a047;
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--samsung-black);
    color: var(--samsung-white);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--samsung-gradient-dark);
    z-index: -2;
}

.background-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(20, 40, 160, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(123, 104, 238, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 60%);
    animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    33% { transform: translate(-2%, 2%) rotate(1deg); opacity: 0.8; }
    66% { transform: translate(2%, -2%) rotate(-1deg); opacity: 0.9; }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.samsung-logo {
    height: 20px;
    width: auto;
    color: var(--samsung-white);
}

.logo-image {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.event-badge {
    background: var(--samsung-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--samsung-gray-300);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--samsung-white);
}

/* Main Content */
.main-content {
    min-height: 100vh;
    padding-top: 80px;
}

/* Registration Overlay */
.registration-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.registration-overlay.hidden {
    display: none;
}

.registration-card {
    background: rgba(20, 20, 30, 0.9);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: cardSlideUp 0.6s ease-out;
}

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

.card-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.galaxy-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--samsung-gradient);
    position: relative;
    animation: ringPulse 2s ease-in-out infinite;
}

.galaxy-ring::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: rgba(20, 20, 30, 0.95);
    border-radius: 50%;
}

.galaxy-ring::after {
    content: '✦';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

@keyframes ringPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(65, 105, 225, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(65, 105, 225, 0); }
}

.card-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-header p {
    color: var(--samsung-gray-300);
    font-size: 0.95rem;
}

/* Form Styles */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--samsung-gray-200);
}

.form-group input[type="text"],
.form-group input[type="email"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: var(--samsung-white);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-group input::placeholder {
    color: var(--samsung-gray-600);
}

.form-group input:focus {
    outline: none;
    border-color: var(--samsung-blue-light);
    background: rgba(65, 105, 225, 0.1);
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.2);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--samsung-gray-600);
}

/* Checkbox Styles */
.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-top: 2px;
}

.checkbox-label input:checked + .checkmark {
    background: var(--samsung-blue);
    border-color: var(--samsung-blue);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.checkbox-label input:focus + .checkmark {
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.3);
}

.checkbox-text {
    font-size: 0.85rem;
    color: var(--samsung-gray-300);
    line-height: 1.5;
}

.checkbox-text .link {
    color: var(--samsung-blue-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.checkbox-text .link:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

/* Error Message */
.error-message {
    background: rgba(229, 57, 53, 0.15);
    border: 1px solid rgba(229, 57, 53, 0.3);
    color: #ff6b6b;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    display: none;
}

.error-message.visible {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Submit Button */
.submit-btn {
    background: var(--samsung-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

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

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

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(20, 40, 160, 0.4);
}

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

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Stream Section */
.stream-section {
    padding: 1.5rem 2rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.stream-section.hidden {
    display: none;
}

.welcome-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-bar span {
    color: var(--samsung-gray-300);
}

.welcome-bar strong {
    color: var(--accent-cyan);
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--samsung-gray-300);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(229, 57, 53, 0.2);
    border-color: var(--error-red);
    color: #ff6b6b;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    height: calc(100vh - 200px);
    min-height: 500px;
}

/* Stream Container */
.stream-container {
    background: rgba(10, 10, 15, 0.8);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.stream-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(229, 57, 53, 0.2);
    color: #ff6b6b;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.stream-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--samsung-white);
}

.stream-wrapper {
    flex: 1;
    position: relative;
    background: #000;
}

.stream-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
}

.stream-placeholder.hidden {
    display: none;
}

.placeholder-content {
    text-align: center;
    padding: 2rem;
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(65, 105, 225, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
}

.placeholder-icon svg {
    width: 32px;
    height: 32px;
    color: var(--samsung-blue-light);
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.placeholder-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--samsung-white);
}

.placeholder-content p {
    color: var(--samsung-gray-600);
    font-size: 0.9rem;
}

.stream-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.stream-iframe.hidden {
    display: none;
}

/* Chat Container */
.chat-container {
    background: rgba(10, 10, 15, 0.8);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

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

.chat-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--samsung-white);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--success-green);
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
}

.chat-wrapper {
    flex: 1;
    position: relative;
}

.chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    color: var(--samsung-gray-600);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--samsung-gray-600);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--samsung-white);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .stream-wrapper {
        aspect-ratio: 16/9;
    }
    
    .chat-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .registration-card {
        padding: 2rem 1.5rem;
    }
    
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .stream-section {
        padding: 1rem;
    }
    
    .welcome-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .registration-card {
        padding: 1.5rem 1rem;
        border-radius: var(--border-radius);
    }
    
    .galaxy-ring {
        width: 60px;
        height: 60px;
    }
    
    .form-group input {
        padding: 0.875rem 1rem;
    }
}
