:root {
    --tb-primary: #135bec;
    --tb-bg: #101622;
    --tb-card-bg: #1a222e;
    --tb-border: rgba(255, 255, 255, 0.08);
    --tb-sidebar-width: 260px;
    --tb-gold: #ffd700;
    --tb-pink: #ff0084;
    --tb-teal: #4ecdc4;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    background-color: var(--tb-bg);
    color: #f6f6f8;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
    font-family: "Plus Jakarta Sans", "sans-serif" !important;
}

/* Sidebar */
.sidebar {
    width: var(--tb-sidebar-width);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    background-color: var(--tb-bg);
    border-right: 1px solid var(--tb-border);
    padding: 1.5rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: white;
    text-decoration: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background-color: rgba(19, 91, 236, 0.15);
    color: var(--tb-primary);
}

.nav-icon {
    font-size: 1.1rem;
}

/* Main Layout */
.main-content {
    margin-left: var(--tb-sidebar-width);
    padding: 2rem;
    transition: margin-left 0.3s;
    min-height: 100vh;
}

/* Mobile Sidebar Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-top: 1rem;
    }

    .mobile-toggle {
        display: block;
    }

    .sidebar-backdrop.show {
        display: block;
    }
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: white;
}

/* Hero Section (Dashboard) */
.hero-section {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    height: 400px;
    margin-bottom: 3rem;
    border: 1px solid var(--tb-border);
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.hero-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Horizontal Scroll Sections (Dashboard) */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.view-all {
    font-size: 0.9rem;
    color: var(--tb-primary);
    text-decoration: none;
    font-weight: 500;
}

.scroll-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Photo Cards */
.photo-card {
    min-width: 280px;
    background: var(--tb-card-bg);
    border: 1px solid var(--tb-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Grid Layouts */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* --- Calendar Specifics --- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
}

.calendar-day-header {
    background-color: var(--tb-card-bg);
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.calendar-day {
    background-color: var(--tb-bg);
    min-height: 120px;
    padding: 0.75rem;
    position: relative;
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.calendar-day:hover {
    background-color: var(--tb-card-bg);
    color: white;
}

.calendar-day.today {
    background-color: rgba(19, 91, 236, 0.1);
}

.calendar-day.today .day-number {
    background-color: var(--tb-primary);
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.photo-indicator {
    width: 100%;
    height: 60px;
    background-size: cover;
    background-position: center;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    position: relative;
    background-color: rgba(255, 255, 255, 0.05);
}

.photo-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    color: white;
}

.side-panel {
    background: var(--tb-card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
}

.on-this-day-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: inherit;
}

.on-this-day-item:hover {
    color: var(--tb-primary);
}

/* --- Year in Review Specifics --- */
.yir-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.yir-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(180deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.yir-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-card {
    background: var(--tb-card-bg);
    border: 1px solid var(--tb-border);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s;
    height: 100%;
    /* Important for grid alignment */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--tb-primary);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
}

.highlight-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    height: 500px;
    border: 1px solid var(--tb-border);
}

.highlight-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.highlight-card:hover .highlight-img {
    transform: scale(1.05);
}

.highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.badge-floating {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.month-card {
    aspect-ratio: 1;
    background: var(--tb-card-bg);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--tb-border);
}

.month-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.month-card:hover .month-bg {
    opacity: 0.8;
}

.month-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* --- Photo Detail Specifics --- */
.photo-viewer {
    height: 100%;
    display: flex;
    gap: 2rem;
    min-height: 80vh;
    /* Fallback */
}

.photo-stage {
    flex: 1;
    background: #000;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.photo-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.metadata-panel {
    width: 350px;
    background: var(--tb-card-bg);
    border-radius: 1.5rem;
    border: 1px solid var(--tb-border);
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.back-btn {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--tb-primary);
}

.photo-stage .back-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    backdrop-filter: blur(10px);
}

.tag-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-pill:hover {
    background: var(--tb-primary);
    color: white;
}

.comment-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1rem;
}

.action-btn {
    width: 100%;
    background: var(--tb-primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    text-decoration: none;
    transition: opacity 0.2s;
}

.action-btn:hover {
    opacity: 0.9;
    color: white;
}

.about-card {
    background: var(--tb-card-bg);
    border: 1px solid var(--tb-border);
    border-radius: 1.5rem;
    padding: 3rem;
    max-width: 800px;
    margin: 4rem auto;
}

.dropdown-toggle::after {
    vertical-align: middle;
}

/* --- Mobile Optimizations --- */
@media (max-width: 768px) {
    .yir-title {
        font-size: 2.5rem;
    }

    .highlight-card {
        height: 350px;
    }

    .photo-viewer {
        flex-direction: column;
        height: auto;
    }

    .photo-stage {
        height: 50vh;
    }

    .metadata-panel {
        width: 100%;
    }

    .about-card {
        padding: 1.5rem;
        margin: 2rem auto;
    }
}