/* ==================== BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #fe2c55;
    --primary-dark: #e91e4d;
    --bg-dark: #000000;
    --bg-card: #121212;
    --bg-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #2a2a2a;
    --success: #00c853;
    --warning: #ffc107;
    --danger: #ff5252;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --radius-sm: 8px;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input, textarea {
    font-family: inherit;
}

/* ==================== APP CONTAINER ==================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== HEADER ==================== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(0,0,0,0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.header-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-link {
    text-decoration: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ==================== EVENTS CONTAINER ==================== */
.events-container {
    flex: 1;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* ==================== EVENTS GRID ==================== */
.events-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-card {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.event-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.event-card:active {
    transform: scale(0.98);
}

.event-thumbnail {
    width: 100px;
    min-width: 100px;
    height: 140px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.event-thumbnail .play-icon {
    font-size: 2rem;
    color: white;
    opacity: 0.9;
}

.event-info {
    padding: 16px 16px 16px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-date {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.event-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.empty-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-align: center;
}

.modal-content p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* ==================== ERROR PAGES ==================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.error-content h1 {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.error-content p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 32px;
}

.error-content .btn-primary {
    width: auto;
    display: inline-block;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .header-content {
        padding: 24px 16px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .events-container {
        padding: 16px;
    }
    
    .event-card {
        gap: 12px;
    }
    
    .event-thumbnail {
        width: 80px;
        min-width: 80px;
        height: 112px;
    }
    
    .event-info {
        padding: 12px 12px 12px 0;
    }
    
    .event-title {
        font-size: 1rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card {
    animation: fadeIn 0.3s ease forwards;
}

.events-grid .event-card:nth-child(1) { animation-delay: 0.05s; }
.events-grid .event-card:nth-child(2) { animation-delay: 0.1s; }
.events-grid .event-card:nth-child(3) { animation-delay: 0.15s; }
.events-grid .event-card:nth-child(4) { animation-delay: 0.2s; }
.events-grid .event-card:nth-child(5) { animation-delay: 0.25s; }
