:root {
    --bg-overlay: rgba(252, 245, 232, 0.5);
    --card-bg: rgba(255, 248, 236, 0.9);
    --accent-color: #c7772b;
    --text-color: #4b3526;
    --hover-color: #e09a4e;
    --logo-color: #5a3f2f;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #0f1117;
    background-image: url("../img/background.jpg?v=20260305");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color);
}

body[data-style="Dark"] {
    --bg-overlay: rgba(8, 8, 8, 0.62);
    --card-bg: rgba(16, 16, 16, 0.88);
    --accent-color: #ff6a00;
    --hover-color: #dc5c05;
    --text-color: #f3f4f6;
    --logo-color: #e5e7eb;
}

body[data-style="deep-blue"] {
    --bg-overlay: rgba(10, 21, 45, 0.58);
    --card-bg: rgba(17, 28, 50, 0.88);
    --accent-color: #33a1ff;
    --hover-color: #1a7ee0;
    --text-color: #f3f4f6;
    --logo-color: #e5e7eb;
}

body[data-style="ice"] {
    --bg-overlay: rgba(5, 22, 38, 0.45);
    --card-bg: rgba(20, 52, 78, 0.78);
    --accent-color: #67e8f9;
    --hover-color: #0891b2;
    --text-color: #f3f4f6;
    --logo-color: #e5e7eb;
}

body[data-style="norton"] {
    --bg-overlay: rgba(0, 0, 0, 0.9);
    --card-bg: #000080;
    --accent-color: #00ff00;
    --hover-color: #ffff00;
    --text-color: #ffffff;
    --logo-color: #ffffff;
    font-family: "Courier New", monospace;
    background-color: #000000;
    background-image: none;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    z-index: -1;
}

.top-bar {
    position: absolute;
    top: 30px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    font-family: "Arial Black", Gadget, sans-serif;
}

.date-main {
    display: flex;
    align-items: center;
}

.date-number {
    font-size: 3rem;
    line-height: 0.8;
    font-weight: 900;
    color: var(--logo-color);
    margin-right: 10px;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.date-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    border-left: 2px solid var(--accent-color);
    padding-left: 15px;
}

.date-month {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-color);
    text-transform: lowercase;
}

.date-year {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.1;
    color: rgba(243, 244, 246, 0.6);
    letter-spacing: 1px;
}

.date-weekday {
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.1;
    color: rgba(243, 244, 246, 0.9);
    text-transform: lowercase;
    text-align: center;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 60px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.nas-link {
    display: inline-flex;
    text-decoration: none;
}

.nas-link i.fa-server {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
    transition: color 0.3s ease;
}

.nas-link:hover i.fa-server {
    color: #fff;
}

.nas-link.disabled {
    opacity: 0.55;
    pointer-events: none;
}

.logo-container {
    width: 240px;
    text-transform: uppercase;
    font-weight: 900;
    font-family: "Arial Black", Gadget, sans-serif;
    color: var(--logo-color);
    text-align: center;
}

.logo-line {
    display: block;
    text-align: center;
    line-height: 1.1;
    text-shadow: 1px 1px 0 #999, 2px 2px 0 #777, 3px 3px 5px rgba(0, 0, 0, 0.6);
}

.title-line {
    display: block;
    text-align: center;
}

.synology {
    font-size: 38px;
}

.links-container {
    width: 90%;
    max-width: 380px;
    padding-bottom: 60px;
}

.link-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    padding: 18px 25px;
    margin-bottom: 15px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.link-card:nth-child(1) { animation-delay: 0.3s; }
.link-card:nth-child(2) { animation-delay: 0.4s; }
.link-card:nth-child(3) { animation-delay: 0.5s; }
.link-card:nth-child(4) { animation-delay: 0.6s; }
.link-card:nth-child(5) { animation-delay: 0.7s; }
.link-card:nth-child(6) { animation-delay: 0.8s; }
.link-card:nth-child(7) { animation-delay: 0.9s; }
.link-card:nth-child(8) { animation-delay: 1s; }
.link-card:nth-child(9) { animation-delay: 1.1s; }
.link-card:nth-child(10) { animation-delay: 1.2s; }
.link-card:nth-child(11) { animation-delay: 1.3s; }
.link-card:nth-child(12) { animation-delay: 1.4s; }

.link-card:hover {
    background: var(--hover-color);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.link-card i {
    font-size: 1.5rem;
    width: 45px;
    text-align: center;
    margin-right: 15px;
    color: var(--accent-color);
}

.link-card:hover i {
    color: #fff;
}

.link-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

body[data-style="norton"] .header {
    margin-top: 30px;
    margin-bottom: 20px;
}

body[data-style="norton"] .logo-line {
    text-shadow: none;
    font-weight: 700;
}

body[data-style="norton"] .links-container {
    max-width: 860px;
    background: #50a0a0;
    border: 2px solid #c0c0c0;
    border-radius: 0;
    padding: 8px;
}

body[data-style="norton"] .link-card {
    border-radius: 0;
    border: 1px solid #1a8f1a;
    box-shadow: none;
    margin-bottom: 6px;
    backdrop-filter: none;
}

body[data-style="norton"] .link-card i {
    width: 30px;
}

body[data-style="norton"] .link-card,
body[data-style="norton"] .link-card:link,
body[data-style="norton"] .link-card:visited {
    color: #0000ee;
    text-decoration: underline;
}

body[data-style="norton"] .link-card:hover {
    color: #0000ee;
}

body[data-style="norton"] .link-card i {
    color: #0000ee;
}

.admin-link {
    position: fixed;
    right: 28px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    z-index: 5;
}

.admin-link:hover {
    background: var(--hover-color);
    color: #fff;
}

.admin-link i {
    font-size: 1.3rem;
}

@media (min-width: 900px) {
    .links-container.layout-grid {
        max-width: 820px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .links-container.layout-grid .link-card {
        margin-bottom: 0;
    }

    .links-container.layout-grid-odd-tail .link-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .top-bar {
        display: none;
    }

    .header {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        margin-top: 20px;
        gap: 30px;
    }

    .logo-container {
        display: flex;
        flex-direction: column;
        text-align: left;
        max-width: 60%;
    }

    .synology {
        font-size: 28px;
        line-height: 1.1;
        margin: 0;
    }

    .nas-link i.fa-server {
        font-size: 3rem;
        margin-top: 20px;
    }

    .links-container {
        width: 95%;
        padding-bottom: 40px;
    }

    .link-card {
        padding: 15px 20px;
        margin-bottom: 12px;
    }

    .admin-link {
        right: 18px;
        bottom: 18px;
        width: 42px;
        height: 42px;
    }
}
