/* ========================================
   CSS Variables & Imports
   ======================================== */
:root {
    --bg-color: #f5f5f7;
    --header-bg: rgba(255, 255, 255, 0.7);
    --sidebar-bg: rgba(255, 255, 255, 0.5);
    --accent-color: #0071e3;
    --accent-gradient: linear-gradient(135deg, #0071e3, #40a9ff);
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --border-color: rgba(210, 210, 215, 0.5);
    --card-bg: rgba(255, 255, 255, 0.8);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --glass-border: rgba(255, 255, 255, 0.18);
    --radius-lg: 20px;
    --radius-md: 12px;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ========================================
   Base Styles
   ======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 113, 227, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(64, 169, 223, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 64px);
}

/* Main Content Spacing */
main {
    padding-top: 2.5rem;
    padding-bottom: 5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
}

.hidden {
    display: none;
}

/* ========================================
   Header & Navigation
   ======================================== */
header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    header {
        padding: 0.75rem 0.75rem;
    }
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 650px;
    justify-content: flex-end;
}

.language-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 38px;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-light);
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    min-width: 160px;
    padding: 0.5rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.lang-menu.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.lang-option:hover {
    background: var(--bg-hover);
    color: var(--accent-color);
}

.lang-option.active {
    background: var(--accent-light);
    color: var(--accent-color);
    font-weight: 600;
}

.lang-option .flag {
    font-size: 1.2rem;
}

h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Search */
.search-container {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-container input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: #f1f1f2;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.search-container input:focus {
    outline: none;
    background: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* ========================================
   Common Components
   ======================================== */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--accent-color);
}

.month-group-header {
    font-size: 0.95rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 16px;
    border-radius: 10px;
    margin: 1rem 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* View Header for secondary pages */
.view-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.view-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.view-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.3);
}

.btn-explore-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2.5rem;
    background: white;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.btn-explore-more:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 113, 227, 0.2);
}

/* Filters */
.filters {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tag {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tag:hover {
    background: #f1f1f2;
}

.filter-tag.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* Filter UI Components */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.btn-text-only {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
}

.btn-text-only:hover {
    color: var(--accent-color) !important;
}

.form-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #f9f9fa;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: var(--text-main);
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 1rem;
    height: 1rem;
}

/* Source Badges */
.source-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.source-badge.studiog {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.source-badge.fresh {
    background: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.source-badge i {
    font-size: 0.6rem;
}

.source-selector {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* States */
.no-results,
.loading,
.error {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.loading-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 1.5rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 113, 227, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-state i {
    font-size: 4rem;
    color: var(--text-muted);
}

.error-state h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin: 0;
}

.error-state p {
    color: var(--text-muted);
    margin: 0;
}

/* ========================================
   Event Cards
   ======================================== */
.stack-list,
.event-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.event-card:hover {
    border-color: var(--accent-color);
}

.event-card:nth-child(even) {
    background-color: #f1f5f9;
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.event-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.event-category-badge {
    font-size: 0.75rem;
    padding: 2px 10px;
    background: #e9ecef;
    color: var(--text-muted);
    border-radius: 12px;
    font-weight: 500;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.event-title-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    display: block;
    margin-top: 0.25rem;
    transition: color 0.2s;
}

.event-title-link:hover {
    color: var(--accent-color);
}

.event-models {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.5rem;
    align-items: center;
    /* Changed from flex-start to center */
}

.event-models>i {
    margin-top: -2px;
    /* Slight adjustment for visual centering with bubbles */
}

.model-tag-link {
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-color);
    padding: 2px 12px 2px 4px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 4px;
    position: relative;
    border: 1px solid transparent;
    -webkit-touch-callout: none;
    /* Disable native iOS link preview */
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tag-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.model-tag-link:active {
    transform: scale(0.95);
    background: rgba(0, 113, 227, 0.15);
}

.model-tag-link.is-pressing {
    animation: tagPressing 0.5s infinite alternate;
}

@keyframes tagPressing {
    from {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 113, 227, 0);
    }

    to {
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(0, 113, 227, 0.3);
    }
}

.model-tag-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    padding-right: 16px;
}

.model-tag-link:hover .tag-avatar {
    /* transform: scale(1.5); */
    /* Disable simple zoom in favor of tooltip */
    box-shadow: 0 0 0 2px white, 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Global Model Preview Tooltip */
#model-preview-tooltip {
    position: absolute;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    padding: 8px;
    pointer-events: auto;
    opacity: 0;
    transform: scale(0.95);
    transform-origin: center;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none;
    width: fit-content;
    height: auto;
    max-width: 280px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

#model-preview-tooltip.is-active {
    opacity: 1;
    transform: scale(1);
    display: block;
}

#model-preview-tooltip img {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    display: block;
    object-fit: contain;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-user-drag: none;
}

#model-preview-tooltip .preview-name {
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
    padding-bottom: 4px;
    pointer-events: none;
}

@media (max-width: 768px) {
    #model-preview-tooltip {
        max-width: 260px;
        /* Slightly larger on mobile */
    }
}

@media (max-width: 480px) {
    #model-preview-tooltip {
        position: fixed;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        max-width: 85vw;
        width: auto;
    }
}

.model-tag-link:hover {
    background: var(--accent-color);
    color: white;
}

.event-external-link-small {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-top: 0.75rem;
    background: rgba(0, 113, 227, 0.05);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 113, 227, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-start;
}

.event-external-link-small:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateX(3px);
}

.event-external-link-small i {
    font-size: 0.75rem;
}

/* Today/Focus Cards */
.today-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.today-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 113, 227, 0.1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.today-card:hover {
    transform: translateY(-8px);
}

.today-card-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.3);
}

.today-title-link {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s;
}

.today-title-link:hover {
    color: var(--accent-color);
}

.today-card.tomorrow-variant {
    border-color: #ff9500;
    background: linear-gradient(135deg, #ffffff 0%, #fffbf5 100%);
    box-shadow: 0 10px 30px rgba(255, 149, 0, 0.1);
}

.today-card.tomorrow-variant .today-card-badge {
    background: #ff9500;
    box-shadow: 0 4px 10px rgba(255, 149, 0, 0.3);
}

.today-card.yesterday-variant {
    border-color: #86868b;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f7 100%);
    opacity: 0.9;
}

.today-card.yesterday-variant .today-card-badge {
    background: #86868b;
    box-shadow: 0 4px 10px rgba(134, 134, 139, 0.3);
}

.more-nav-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

/* ========================================
   Model Cards & Grid
   ======================================== */
.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.model-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-height: 250px;
    justify-content: flex-start;
    border: 1px solid #eee;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.model-avatar {
    width: 120px;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f1f1f2;
    border: 2px solid #e8e8e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.model-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-name {
    font-weight: 600;
    margin-bottom: auto;
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.model-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
}

.model-links a {
    color: var(--text-muted);
    font-size: 1.35rem;
    transition: color 0.2s;
}

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

/* ========================================
   Model Detail Page
   ======================================== */
.model-detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.model-detail-avatar img {
    width: 240px;
    height: 320px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #e8e8e8;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.model-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.model-detail-info h2 {
    font-size: 2rem;
    color: var(--text-main);
}

.model-stats {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
}

.events-section {
    margin-top: 2rem;
}

.events-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   Calendar
   ======================================== */
.calendar-container {
    max-width: 100%;
    margin: 0;
    padding: 1.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    /* Ensure content stays within bounds */
}

.calendar-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    margin-top: 1rem;
    padding-bottom: 0.5rem;
    /* Space for scrollbar */
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-nav-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.calendar-day-head {
    text-align: center;
    font-weight: 700;
    padding: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    justify-content: flex-start;
    /* Start from top */
    gap: 0.5rem;
}

.day-number {
    width: 100%;
    text-align: center;
    font-weight: 600;
}

.calendar-day:hover {
    background: white;
    transform: translateY(-4px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.calendar-day.today {
    background: none;
    border: 2.5px solid #FFD700 !important;
    /* Gold/Yellow Border */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.calendar-day.today .day-number {
    color: var(--text-main);
    font-weight: 800;
}

.calendar-day.selected {
    border: 2.5px solid #FF3B30 !important;
    /* Red Border */
    background: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
    z-index: 5;
}

.calendar-day.selected .day-number {
    color: #FF3B30;
    font-weight: 800;
}

.calendar-day.today::before {
    display: none;
}

.calendar-day.other-month {
    opacity: 0.3;
    background: transparent;
}

.day-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.event-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}

/* .event-dot removed */

.event-count-badge {
    font-size: 0.75rem;
    padding: 2px 7px;
    background: var(--accent-color);
    color: white;
    border-radius: 6px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 113, 227, 0.2);
}

/* ========================================
   Events Page Layout
   ======================================== */
.events-main-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
}

.events-sidebar {
    width: 250px;
    padding: 1.5rem;
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.events-content {
    flex: 1;
    min-width: 0;
}

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

.upcoming-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ========================================
   Event Detail Page
   ======================================== */
.event-detail-page main {
    padding: 2rem 0;
}

.event-hero {
    padding: 3rem;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.05) 0%, rgba(64, 169, 255, 0.05) 100%);
    border: 2px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.event-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.event-hero-content {
    position: relative;
    z-index: 1;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.event-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.95rem;
}

.event-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.event-external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.75rem;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.2);
}

.event-external-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 113, 227, 0.3);
}

.event-models-section,
.related-events-section {
    margin-bottom: 3rem;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.model-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.model-card-compact {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.new-badge {
    position: absolute;
    top: 5px;
    right: -25px;
    background: #ff3b30;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 25px;
    transform: rotate(45deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.model-card-compact:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.15);
}

.model-avatar-compact {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #e8e8e8;
}

.model-avatar-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-avatar-compact i {
    font-size: 2rem;
    color: var(--text-muted);
}

.model-info-compact {
    flex: 1;
    min-width: 0;
}

.model-info-compact h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-event-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-card-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.3s;
}

.model-card-compact:hover .model-card-arrow {
    color: var(--accent-color);
    transform: translateX(5px);
}

.no-models {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px dashed var(--border-color);
}

.no-models i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.related-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.related-event-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-event-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 113, 227, 0.15);
}

.related-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.related-event-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-event-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-event-models {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

/* ========================================
   Updates Feed
   ======================================== */
.updates-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.update-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border-left: 3px solid var(--accent-color);
    transition: all 0.2s;
}

.update-item:hover {
    background: white;
    transform: translateX(5px);
}

.update-item.update-removal {
    border-left-color: #dc3545;
}

.update-timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* Full List Update Cards (updates.html) - Row-Based Compact Design */
.updates-full-list {
    padding: 0.75rem;
}

.update-card {
    padding: 0.6rem 0.8rem;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-color);
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.update-card.update-removal {
    border-left-color: #dc3545;
}

.update-card:hover {
    background: rgba(0, 113, 227, 0.03);
    /* Subtle accent tint */
    border-left-width: 5px;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.1);
}

.update-card-row {
    display: flex;
    align-items: center;
    /* Center everything vertically */
    gap: 0.8rem;
    width: 100%;
}

.update-badge {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.update-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    /* Increased from 0.15rem */
    min-width: 0;
}

.update-header-row {
    display: block;
    /* Use block to allow inline flow of children */
    line-height: 1.4;
}

.update-event-inline {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.update-date-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    font-size: 0.9rem;
    /* Increased from 0.7rem */
    color: var(--text-main);
    /* Darker color for better visibility */
    font-weight: 800;
    /* Bolder */
    padding: 3px 6px;
    /* Slightly larger padding */
    background: rgba(0, 0, 0, 0.05);
    /* Slightly darker background */
    border-radius: 6px;
    min-width: 36px;
    /* Increased width */
    cursor: help;
}

.update-date-vertical .month {
    font-size: 0.7rem;
    /* Increased from 0.55rem */
    letter-spacing: 0.02em;
    /* Slightly increased spacing */
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.15);
    /* Thicker separator */
    padding-bottom: 1px;
    margin-bottom: 1px;
    opacity: 0.9;
}

.update-model-row {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.8;
    /* Increased from 1.4 for better multi-line spacing */
    white-space: normal;
}

.update-models-inline {
    font-weight: 500;
    font-size: 0.85rem;
}

.update-models-inline a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.1s;
}

.update-models-inline a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.update-source-icon {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 0.2rem;
}

.update-date-inline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.04);
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    cursor: help;
}

.update-action-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0.3rem;
}

.update-event-inline {
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    /* Ensure long words/URL-like titles break */
}

.update-event-inline:hover {
    color: var(--accent-color);
}

.update-date-inline {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
    white-space: nowrap;
}

.update-card-time {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.7;
    margin-left: auto;
    /* Push to the right */
    white-space: nowrap;
}

/* ========================================
   Mobile Navigation
   ======================================== */
#mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    gap: 4px;
    text-decoration: none;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-item i {
    font-size: 1.2rem;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.view {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .events-main-layout {
        flex-direction: column;
    }

    .events-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.5rem 1rem;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .main-nav {
        display: none;
    }

    #mobile-nav {
        display: flex;
    }

    main {
        padding-bottom: 70px;
    }

    #content {
        padding: 1.5rem 1rem;
    }

    .grid-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .calendar-container {
        padding: 0.75rem;
    }

    .calendar-grid {
        gap: 4px;
        /* Reduced gap */
        min-width: 320px;
        /* Bare minimum to avoid extreme compression */
    }

    .calendar-day {
        min-height: 50px;
        /* Much shorter */
        padding: 0.25rem;
        border-radius: 6px;
        gap: 2px;
    }

    .day-number {
        font-size: 0.75rem;
    }

    .event-count-badge {
        padding: 1px 4px;
        font-size: 0.65rem;
        min-width: 14px;
        height: 14px;
    }

    .calendar-day-head {
        font-size: 0.65rem;
        padding: 2px;
    }

    .calendar-day:hover {
        transform: none;
        box-shadow: var(--shadow);
    }

    .calendar-day-head {
        font-size: 0.7rem;
        padding: 5px;
        min-width: 45px;
    }

    .day-number {
        font-size: 0.8rem;
    }

    .event-indicator {
        justify-content: center;
    }

    .event-dot {
        width: 6px;
        height: 6px;
    }

    .event-count-badge {
        display: inline-block;
        font-size: 0.65rem;
        padding: 1px 4px;
    }

    .event-hero {
        padding: 2rem 1.5rem;
    }

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

    .models-grid,
    .related-events-grid {
        grid-template-columns: 1fr;
    }

    .event-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Model Detail Mobile */
    .model-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .model-detail-avatar img {
        width: 180px;
        height: auto;
        max-height: 240px;
    }

    .model-detail-info h2 {
        font-size: 1.75rem;
    }

    .model-stats {
        justify-content: center;
        font-size: 0.9rem;
    }

    .social-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        align-self: center;
    }

    .social-link i {
        font-size: 0.9rem;
    }

    .model-links a {
        font-size: 1.1rem;
    }
}

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

    .event-hero {
        padding: 1.5rem 1rem;
    }

    .model-card-compact {
        padding: 1rem;
    }

    .model-avatar-compact {
        width: 60px;
        height: 60px;
    }

    .today-grid {
        grid-template-columns: 1fr;
    }

    /* Ultra-compact updates on mobile */
    .update-card {
        padding: 0.35rem 0.5rem;
        margin-bottom: 0.3rem;
    }

    .update-body {
        font-size: 0.85rem;
    }

    .update-card-time {
        font-size: 0.65rem;
    }
}

/* Archive & Notes Styles */
.archive-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid var(--warning);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    backdrop-filter: blur(5px);
}

.archive-alert i {
    font-size: 1.5rem;
    color: var(--warning);
}

.archive-alert-content strong {
    display: block;
    color: var(--warning);
    margin-bottom: 0.25rem;
}

.archive-alert-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.archived-link {
    background: var(--text-muted) !important;
    opacity: 0.7;
}

.event-notes-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.event-notes-box h4 {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.event-notes-box p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-main);
}

/* Swimsuit Status Styles */
.model-tag-link.swimsuit-ok {
    border-color: #4ecdc4;
    /* Fresh Green/Blue */
}

.model-tag-link.swimsuit-ok .swimsuit-icon {
    color: #4ecdc4;
    margin-left: 4px;
    font-size: 0.8em;
}

.model-tag-link.swimsuit-option {
    border-color: #ff6b6b;
    /* Red/Pink for option/extra cost */
}

.model-tag-link.swimsuit-option .swimsuit-icon {
    color: #ff6b6b;
    margin-left: 4px;
    font-size: 0.8em;
}

.model-tag-link.swimsuit-ng {
    border-color: #ccc;
    opacity: 0.7;
}

.model-tag-link.swimsuit-ng .swimsuit-icon {
    color: #999;
    margin-left: 4px;
    font-size: 0.8em;
}

.model-tag-link.swimsuit-no-publish {
    border-color: #f1c40f;
    /* Orange/Yellow for caution */
}

.model-tag-link.swimsuit-no-publish .swimsuit-icon {
    color: #f39c12;
    margin-left: 4px;
    font-size: 0.8em;
}

.status-sub-icon {
    font-size: 0.6em;
    vertical-align: top;
    margin-left: -2px;
}

/* Model Status Badges in Detail Card */
.model-status-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    font-weight: 500;
}

.status-ok {
    background-color: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.status-option {
    background-color: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.status-ng {
    background-color: #f1f3f5;
    color: #adb5bd;
    border: 1px solid #dee2e6;
}

.status-no-publish {
    background-color: rgba(241, 196, 15, 0.1);
    color: #f39c12;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

/* Combined Status Styles */
.model-tag-link.swimsuit-ok-no-publish {
    border-color: #f1c40f;
    /* Yellowish to warn about no publish */
    border-left: 3px solid #4ecdc4;
    /* Green accent for OK */
}

.model-tag-link.swimsuit-ok-no-publish .swimsuit-icon {
    color: #4ecdc4;
    /* Main icon green */
}

/* The sub-icon camera slash will inherit or need specific style? */

.model-tag-link.swimsuit-option-no-publish {
    border-color: #f1c40f;
    border-left: 3px solid #ff6b6b;
    /* Red accent for Option */
}

.model-tag-link.swimsuit-option-no-publish .swimsuit-icon {
    color: #ff6b6b;
}

/* Emoji Fixes */
.swimsuit-icon {
    font-style: normal;
    /* Emojis shouldn't be italic if wrapped in <i> or <span> */
    margin-right: 2px;
}

.model-status-badge {
    font-weight: bold;
    /* Make text pop a bit more with emojis */
}

/* ========================================
   Model Card Actions (Event Detail Page)
   ======================================== */
.model-card-link-container {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    overflow: hidden;
}

.model-card-link-container:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.model-card-link-container .model-card-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    border: none !important;
    background: none !important;
}

.model-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
}

.model-card-actions .btn-model-action {
    font-size: 1.1em;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    background: white;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.model-card-actions .btn-model-action:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-model-action.disabled {
    opacity: 0.3 !important;
    filter: grayscale(1) !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
    /* Allow tooltip/alert to show */
}

.model-card-actions .btn-model-action.disabled:hover {
    transform: none;
    box-shadow: none;
}