:root {
    --bg-color: #0c0a0f;
    --text-primary: #f5f0e8;
    --text-secondary: #a89e8c;
    --accent-color: #8b1a1a;
    --accent-secondary: #d4a017;
    --accent-light: #e8c547;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(212, 175, 55, 0.1);
    --glass-blur: blur(24px);
    --glass-saturate: saturate(180%);
    --nav-bg: rgba(12, 10, 15, 0.6);
    --footer-bg: #1a1a2e;
    --input-bg: rgba(12, 10, 15, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(ellipse at 20% 50%, color-mix(in srgb, var(--accent-color) 6%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, color-mix(in srgb, var(--accent-secondary) 4%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, color-mix(in srgb, var(--accent-color) 3%, transparent) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;

}

.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

.bg-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50vw;
    max-width: 600px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    animation: spinBg 50s linear infinite;
}

@keyframes spinBg {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ---- Glassmorphic Navbar ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 2.5rem;
    background: var(--nav-bg);
    backdrop-filter: var(--glass-blur) var(--glass-saturate);
    -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
}

.logo img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
}

.logo span {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.4rem;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-btn:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.1);
}

/* ---- Back Button ---- */
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--accent-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.back-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-secondary);
    transform: translateX(-4px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    color: var(--accent-light);
}



/* ---- Landing Page ---- */
.landing-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.landing-hero {
    text-align: center;
    margin-bottom: 3.5rem;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-hero img {
    height: 130px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.4));
    animation: floatLogo 4s ease-in-out infinite;
    background-color: #fff;
    padding: 12px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.landing-hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-light), #fff, var(--accent-secondary));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.8rem;
    letter-spacing: -1px;
    animation: shimmerText 6s ease infinite;
}

.landing-hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

@keyframes shimmerText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.year-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.year-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--glass-blur) var(--glass-saturate);
    -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
    border: 1px solid rgba(212, 175, 55, 0.08);
    border-radius: 24px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--i, 0) * 0.12s);
    opacity: 0;
}

.year-card:nth-child(1) {
    --i: 0;
}

.year-card:nth-child(2) {
    --i: 1;
}

.year-card:nth-child(3) {
    --i: 2;
}

.year-card:nth-child(4) {
    --i: 3;
}

.year-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--card-accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.year-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--card-accent) 8%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
}

.year-card:hover::before {
    opacity: 1;
}

.year-card:hover::after {
    opacity: 1;
}

.year-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: color-mix(in srgb, var(--card-accent) 40%, transparent);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 40px color-mix(in srgb, var(--card-accent) 10%, transparent);
}

.year-card-icon {
    position: relative;
    z-index: 1;
    font-size: 2.8rem;
    color: var(--card-accent);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--card-accent) 8%, transparent);
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--card-accent) 15%, transparent);
    transition: all 0.4s;
}

.year-card:hover .year-card-icon {
    transform: scale(1.1);
    box-shadow: 0 0 25px color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.year-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.year-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.card-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    z-index: 1;
    color: var(--text-secondary);
    transition: all 0.4s;
}

.year-card:hover .card-arrow {
    color: var(--card-accent);
    transform: translateX(6px);
}

/* ---- Upload Page ---- */
.upload-page-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--glass-blur) var(--glass-saturate);
    -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
    border: 1px solid rgba(212, 175, 55, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.glass-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-secondary);
}

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.mt-1 {
    margin-top: 1rem;
}

label {
    margin-bottom: 0.6rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

select,
input.styled-input {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    background: var(--input-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: var(--transition);
}

select:focus,
select:hover:not(:disabled),
input.styled-input:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1), inset 0 0 20px rgba(212, 175, 55, 0.02);
    transform: translateY(-2px);
}

select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.file-drop-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    padding: 3rem 2rem;
    border: 2px dashed var(--card-border);
    border-radius: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.upload-icon-large {
    font-size: 3rem;
    color: var(--text-secondary);
    transition: all 0.4s;
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: var(--accent-secondary);
    background: rgba(212, 175, 55, 0.03);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.05);
}

.file-drop-area:hover .upload-icon-large {
    color: var(--accent-secondary);
    transform: scale(1.2);
}

.file-drop-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-msg {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.1rem;
    pointer-events: none;
}

.btn-primary {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.2rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary), var(--accent-light));
    background-size: 200% 200%;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.4s;
    animation: shimmerBtn 4s ease infinite;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shine 3s ease-in-out infinite;
}

.btn-primary:hover {
    box-shadow: 0 15px 30px rgba(139, 26, 26, 0.3);
    transform: translateY(-3px);
}

@keyframes shimmerBtn {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(25deg);
    }

    100% {
        transform: translateX(100%) rotate(25deg);
    }
}

.status-msg {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    min-height: 1.5rem;
}

.status-msg.success {
    color: #3fb950;
}

.status-msg.error {
    color: #f85149;
}

/* ---- Browse Page ---- */
.browse-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.browse-header {
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.browse-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 1rem;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    padding: 0.8rem 1.4rem;
    border-radius: 14px;
    flex-wrap: wrap;
    border: 1px solid rgba(212, 175, 55, 0.06);
}

.crumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.crumb:hover {
    color: var(--accent-secondary);
    transform: translateY(-1px);
}

.crumb.active {
    color: var(--text-primary);
    cursor: default;
}

.crumb::after {
    content: '›';
    margin-left: 0.6rem;
    color: rgba(212, 175, 55, 0.2);
    font-size: 1.1rem;
}

.crumb:last-child::after {
    content: '';
}

.explorer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.folder-item,
.file-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px) var(--glass-saturate);
    border: 1px solid rgba(212, 175, 55, 0.06);
    border-radius: 20px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: staggerIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--stagger, 0) * 0.06s);
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.folder-item::after,
.file-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

.folder-item:hover::after,
.file-item:hover::after {
    opacity: 1;
}

.folder-item:hover,
.file-item:hover {
    transform: translateY(-8px) scale(1.04);
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.3), 0 0 25px rgba(212, 175, 55, 0.06);
}

.item-icon {
    font-size: 3.2rem;
    color: var(--accent-secondary);
    position: relative;
    z-index: 1;
    transition: all 0.4s;
}

.folder-item:hover .item-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px currentColor);
}

.file-item .item-icon {
    color: #f85149;
}

.image-icon {
    color: #58a6ff !important;
}

.item-name {
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-word;
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* File card with download button */
.file-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px) var(--glass-saturate);
    border: 1px solid rgba(212, 175, 55, 0.06);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: staggerIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--stagger, 0) * 0.06s);
    opacity: 0;
}

.file-card:hover {
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 175, 55, 0.05);
}

.file-card .item-icon {
    font-size: 2.8rem;
}

.file-card .item-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.file-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.file-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.btn-view {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-secondary);
    border-color: rgba(212, 175, 55, 0.15);
}

.btn-view:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent-secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.15);
}

.btn-download {
    background: rgba(63, 185, 80, 0.1);
    color: #3fb950;
    border-color: rgba(63, 185, 80, 0.15);
}

.btn-download:hover {
    background: rgba(63, 185, 80, 0.2);
    border-color: #3fb950;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(63, 185, 80, 0.15);
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.5s ease;
}

.empty-state ion-icon {
    font-size: 4rem;
    opacity: 0.4;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 2s linear infinite;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .landing-hero h1 {
        font-size: 2rem;
    }

    .year-cards-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0.8rem 1.2rem;
    }

    .browse-container {
        padding: 1rem;
    }

    .explorer-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }
}

/* ---- Main Footer ---- */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem 1.5rem;
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
    margin-top: 5rem;
}

.main-footer .disclaimer {
    display: block;
    margin-top: 0.5rem;
    font-style: italic;
    opacity: 0.8;
}

.main-footer .credit {
    margin-top: 1.2rem;
    font-size: 0.95rem;
}

.heart-icon {
    color: #e74c3c;
    vertical-align: middle;
    font-size: 1.1rem;
}

/* ---- Floating Instagram Button ---- */
.insta-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(225, 48, 108, 0.4);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    animation: bounceIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.insta-float:hover {
    transform: scale(1.15) translateY(-5px) rotate(8deg);
    box-shadow: 0 15px 35px rgba(225, 48, 108, 0.6);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .insta-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
}
