/* ===== ROOT VARIABLES ===== */
:root {
    --bg-primary: #0a1628;
    --bg-secondary: #0f1f3a;
    --bg-card: #142238;
    --bg-card-hover: #1a2d4d;
    
    --accent-primary: #00b4d8;
    --accent-secondary: #0077b6;
    --accent-tertiary: #90e0ef;
    
    --text-primary: #e8f4f8;
    --text-secondary: #a8c5d1;
    --text-muted: #6b8a9a;
    
    --success: #00d68f;
    --warning: #ffaa00;
    --danger: #ff6b6b;
    
    --border-color: #1e3a5f;
    --border-glow: rgba(0, 180, 216, 0.3);
    
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 180, 216, 0.2);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at top, rgba(0, 180, 216, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-tertiary);
}

/* ===== HEADER ===== */
.header {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

/* Language Switcher */
.nav-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.lang-switcher {
    display: flex;
    gap: 8px;
}

.lang-link {
    font-size: 1.3rem;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.lang-link:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.lang-link.active {
    opacity: 1;
}

/* ===== HERO ===== */
.hero {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CONTROLS ===== */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background: var(--accent-secondary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.search-box input {
    padding: 12px 20px;
    width: 280px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* ===== STATS ===== */
.stats {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-item strong {
    color: var(--accent-primary);
    font-size: 1.1rem;
}

/* ===== CONFERENCES GRID ===== */
.conferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
    padding: 30px 0;
}

/* ===== CONFERENCE CARD ===== */
.conference-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.conference-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.conference-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-secondary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.conference-card:hover::before {
    opacity: 1;
}

.conference-card.hidden {
    display: none;
}

/* Card Header */
.card-header {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.card-type {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-conference { background: rgba(0, 180, 216, 0.2); color: var(--accent-primary); }
.type-summit { background: rgba(255, 170, 0, 0.2); color: var(--warning); }
.type-expo { background: rgba(0, 214, 143, 0.2); color: var(--success); }
.type-forum { background: rgba(144, 224, 239, 0.2); color: var(--accent-tertiary); }
.type-symposium { background: rgba(255, 107, 107, 0.2); color: var(--danger); }
.type-training { background: rgba(138, 43, 226, 0.2); color: #9b59b6; }
.type-workshop { background: rgba(230, 126, 34, 0.2); color: #e67e22; }
.type-meeting { background: rgba(149, 165, 166, 0.2); color: #95a5a6; }

.cyber-badge {
    font-size: 1rem;
    cursor: help;
}

.cfp-badge {
    padding: 3px 8px;
    background: var(--success);
    color: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
}

.cfp-badge.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 214, 143, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(0, 214, 143, 0); }
}

.online-badge,
.tentative-badge {
    font-size: 0.9rem;
    cursor: help;
}

/* Card Title */
.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Card Meta */
.card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-icon {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

/* Card Description */
.card-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* Card Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 4px 10px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag:hover {
    background: rgba(0, 180, 216, 0.2);
    border-color: var(--accent-primary);
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--accent-secondary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-cfp {
    background: transparent;
    color: var(--success);
    border: 1px solid var(--success);
}

.btn-cfp:hover {
    background: var(--success);
    color: var(--bg-primary);
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results p {
    font-size: 1.2rem;
}

/* ===== LEGEND ===== */
.legend {
    padding: 30px 20px;
    margin-top: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.legend h4 {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== FOOTER ===== */
.footer {
    margin-top: 80px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section ul a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.credits {
    margin-top: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        justify-content: center;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .conferences-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        gap: 15px;
    }
}

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

.conference-card {
    animation: fadeIn 0.5s ease forwards;
}

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

/* ===== FAVORITES ===== */
.favorite-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

.favorite-btn .favorite-icon::before {
    content: '\2661';
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.favorite-btn:hover .favorite-icon::before {
    color: var(--danger);
}

.favorite-btn.active .favorite-icon::before {
    content: '\2665';
    color: var(--danger);
}

.favorite-btn.active:hover .favorite-icon::before {
    transform: scale(1.1);
}

/* Favorite card styling */
.conference-card.is-favorite {
    border-color: rgba(255, 107, 107, 0.4);
}

.conference-card.is-favorite::before {
    background: linear-gradient(90deg, var(--danger), var(--warning));
    opacity: 1;
}

/* Favorites filter button */
.filter-btn[data-filter="favorites"] {
    border-color: rgba(255, 107, 107, 0.3);
}

.filter-btn[data-filter="favorites"]:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.filter-btn[data-filter="favorites"].active {
    background: linear-gradient(135deg, var(--danger), #ff8787);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

/* ===== FAVORITES PANEL ===== */
.favorites-panel {
    margin: 20px 0 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--danger);
}

.favorites-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: start;
}

.favorites-info-content h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorites-info-content h4::before {
    content: '\2665';
    color: var(--danger);
}

.favorites-info-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.favorites-info-content .privacy-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

.favorites-export {
    text-align: center;
    min-width: 200px;
}

.favorites-export h4 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.favorites-stat strong {
    color: var(--danger) !important;
}

@media (max-width: 768px) {
    .favorites-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .favorites-export {
        border-top: 1px solid var(--border-color);
        padding-top: 20px;
    }
}

.export-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-export {
    padding: 12px 24px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-export:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

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

#export-txt::before {
    content: '\1F4C4';
}

#export-pdf::before {
    content: '\1F4D1';
}

.export-empty-msg {
    color: var(--warning);
    font-size: 0.85rem;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 170, 0, 0.1);
    border-radius: var(--radius-sm);
}
