:root {
    --bg-color: rgb(18, 18, 18);
    --card-bg: #1e1e1e;
    --text-color: #f1f1f1;
    --accent-color: red;
    --border-radius: 15px;
    --transition: all 0.3s ease;
    --background-primary: rgb(18, 18, 18);
    --background-secondary: #1e1e1e;
    --background-tertiary: rgba(255, 255, 255, 0.1);
    --border-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #121212;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.5;
    scroll-behavior: smooth;
    min-height: 100vh;
}

h1 {
    font-size: 36px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ff6666;
    background: linear-gradient(90deg, #fff, #ff6666);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    margin: 20px 0 10px;
    text-align: center;
}

.notification {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background-color: rgba(30, 30, 30, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 80%;
    width: fit-content;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    text-align: left;
}

    .notification.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

.notification-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
}

    .notification-icon svg {
        width: 100%;
        height: 100%;
    }

.notification-text {
    flex: 1;
    text-align: left;
}

.notification-close {
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
    pointer-events: auto;
}

.notification.error {
    background-color: rgba(255, 59, 48, 0.9);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.notification.warning {
    background-color: rgba(255, 149, 0, 0.9);
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.notification.success {
    background-color: rgba(52, 199, 89, 0.9);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

    .notification.error .notification-icon, .notification.warning .notification-icon, .notification.success .notification-icon {
        color: white;
    }

.tabs {
    display: flex;
    justify-content: center;
    margin: 15px 0 25px;
    gap: 15px;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.tab {
    padding: 14px 28px;
    background: rgba(40, 40, 40, 0.8);
    color: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    flex: 1;
    min-width: 140px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

    .tab.active {
        background: rgba(255, 70, 70, 0.3);
        color: white;
        border-color: rgba(255, 100, 100, 0.6);
        box-shadow: 0 0 15px rgba(255, 70, 70, 0.4);
    }

    .tab:not(.active):hover {
        background: rgba(60, 60, 60, 0.9);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .tab.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, transparent, #ff4a4a, transparent);
        animation: tabPulse 6s infinite;
    }

@keyframes tabPulse {
    0% {
        opacity: 0.25;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.25;
    }
}

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

/* === АРХИВ === */
.archive-table-container {
    max-width: 1000px;
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    max-height: 550px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgb(51 51 51) transparent;
    background: #1e1e1e;
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px;
}

    .archive-table-container::-webkit-scrollbar {
        width: 8px;
    }

    .archive-table-container::-webkit-scrollbar-track {
        background: transparent;
        margin: 5px 0;
        border-radius: 4px;
    }

    .archive-table-container::-webkit-scrollbar-thumb {
        background: rgba(40, 40, 40, 0.8);
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

        .archive-table-container::-webkit-scrollbar-thumb:hover {
            background: rgba(60, 60, 60, 0.8);
        }

.archive-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    table-layout: auto;
}

.shrine-row {
    position: relative;
    transition: background-color 0.3s ease;
    height: 100px;
}

    .shrine-row::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 15px;
        right: 15px;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .shrine-row:last-child::after {
        display: none;
    }

    .shrine-row:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }

.shrine-date-cell {
    padding: 10px 15px;
    width: 200px;
    vertical-align: middle;
    min-width: 150px;
}

.shrine-date {
    color: #d0d0d0;
    font-weight: 500;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

.perks-container {
    padding: 10px 15px;
    vertical-align: middle;
    width: 695px;
}

.perks-scroll-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgb(51 51 51) transparent;
    align-items: center;
    height: 100%;
}

    .perks-scroll-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    .perks-scroll-wrapper::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 3px;
        margin: 0 10px;
    }

    .perks-scroll-wrapper::-webkit-scrollbar-thumb {
        background: rgba(40, 40, 40, 0.8);
        border-radius: 3px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

        .perks-scroll-wrapper::-webkit-scrollbar-thumb:hover {
            background: rgba(60, 60, 60, 0.8);
        }

.archive-perk {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

    .archive-perk:hover {
        transform: translateY(-2px);
    }

    .archive-perk img {
        width: 60px;
        height: 60px;
        object-fit: contain;
        border-radius: 5px;
        transition: transform 0.3s ease;
    }

    .archive-perk:hover img {
        transform: scale(1.1);
    }

.archive-perk-name {
    font-size: 11px;
    color: #f0f0f0;
    text-align: center;
    max-width: 110px;
    word-wrap: break-word;
    line-height: 1.2;
    font-weight: 600;
}

.archive-error {
    color: #ff6666;
    text-align: center;
    padding: 15px;
    background: rgba(255, 100, 100, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 100, 100, 0.3);
    margin: 5px 0;
    font-size: 12px;
}

.no-archive-data {
    text-align: center;
    padding: 40px;
    color: #ccc;
    font-size: 16px;
}

.loading-spinner {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ff6666;
    animation: spin 1s ease-in-out infinite;
}

.card.loading .loading-spinner {
    display: inline-block;
}

.card.loading img {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    max-width: 100%;
    min-height: 80vh;
}

#header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.timer-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0;
}

#timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 424px;
    margin: -10px auto 0;
    gap: 15px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    color: #ccc;
}

#time-left {
    font-size: 16px;
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
}

#card-container {
    position: relative;
    width: 450px;
    height: 450px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 60px;
    margin-bottom: 40px;
}

.card {
    cursor: pointer;
    width: 160px;
    height: 160px;
    background: linear-gradient(145deg, #2e2e2e, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    position: absolute;
    transform: rotate(45deg);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

    .card:hover {
        transform: rotate(45deg) scale(1.1);
        border-color: rgba(255, 0, 0, 0.8);
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    }

    .card::before, .card::after, .card .corner-top-left, .card .corner-bottom-right {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        background: transparent;
        border: 2px solid rgba(255, 0, 0, 0.5);
        transition: opacity 0.3s ease;
    }

    .card::before {
        clip-path: polygon(0 0, 100% 0, 0 100%);
        top: 0;
        left: 0;
        border-right: none;
        border-bottom: none;
    }

    .card::after {
        clip-path: polygon(100% 0, 100% 100%, 0 100%);
        bottom: 0;
        right: 0;
        border-left: none;
        border-top: none;
    }

    .card .corner-top-left {
        clip-path: polygon(0 0, 100% 0, 100% 100%);
        top: 0;
        right: 0;
        border-left: none;
        border-bottom: none;
    }

    .card .corner-bottom-right {
        clip-path: polygon(0 0, 0 100%, 100% 100%);
        bottom: 0;
        left: 0;
        border-right: none;
        border-top: none;
    }

    .card img {
        width: 170px;
        height: 170px;
        transform: rotate(-45deg);
        object-fit: contain;
    }

    .card:nth-child(1) {
        top: 0;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }

    .card:nth-child(2) {
        top: 50%;
        right: 0;
        transform: translateY(-50%) rotate(45deg);
    }

    .card:nth-child(3) {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }

    .card:nth-child(4) {
        top: 50%;
        left: 0;
        transform: translateY(-50%) rotate(45deg);
    }

.rs-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    color: white;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #444;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    max-width: 450px;
    min-width: 320px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

    .rs-tooltip.active {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        pointer-events: auto;
    }

    .rs-tooltip .tooltip-header {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding-bottom: 15px;
    }

    .rs-tooltip .character-icon {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        margin-right: 12px;
        border: 2px solid rgba(255, 255, 255, 0.2);
        object-fit: cover;
        padding: 2px;
        background: var(--background-primary);
    }

    .rs-tooltip .tooltip-title-container {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .rs-tooltip .tooltip-title {
        margin: 0;
        font-size: 20px;
        color: white;
        font-weight: 700;
    }

    .rs-tooltip .tooltip-character {
        font-size: 14px;
        color: #d0d0d0;
        margin-top: 3px;
        font-weight: 400;
    }

    .rs-tooltip .tooltip-close {
        position: absolute;
        top: 15px;
        right: 18px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: #ccc;
        font-size: 20px;
        cursor: pointer;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.3s ease;
        line-height: 1;
        padding: 0;
        margin: 0;
    }

        .rs-tooltip .tooltip-close:hover {
            background-color: rgba(255, 255, 255, 0.2);
            color: white;
        }

    .rs-tooltip .tooltip-content {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        font-size: 14px;
        line-height: 1.6;
        white-space: normal;
        text-align: left;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

        .rs-tooltip .tooltip-content img {
            width: 80px;
            height: 80px;
            float: left;
            margin-right: 10px;
        }

        .rs-tooltip .tooltip-content h2 {
            margin: 0;
            font-size: 16px;
            color: white;
            font-weight: 700;
        }

        .rs-tooltip .tooltip-content .character {
            font-size: 12px;
            color: #d0d0d0;
            margin: 5px 0;
            font-weight: 400;
        }

        .rs-tooltip .tooltip-content .quote {
            font-size: 13px;
            color: #FFFACD;
            margin: 12px 0;
            font-style: italic;
            font-weight: 400;
            line-height: 1.5;
            padding-left: 10px;
            border-left: 2px solid rgba(255, 250, 205, 0.3);
        }

        .rs-tooltip .tooltip-content p {
            font-size: 14px;
            line-height: 1.6;
            white-space: pre-line;
            margin: 0;
            font-weight: 400;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

    .rs-tooltip .price-tier-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .rs-tooltip .price {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #FFFACD;
        font-size: 15px;
        font-weight: 600;
    }

    .rs-tooltip .tier {
        display: inline-block;
        padding: 0.4rem 1rem;
        border-radius: 12px;
        font-weight: 700;
        font-size: 0.8rem;
        border: 1px solid;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .rs-tooltip .tier-s {
        background-color: rgba(255, 50, 50, 0.2);
        color: #ff3232;
        border-color: #ff3232;
    }

    .rs-tooltip .tier-a {
        background-color: rgba(255, 140, 0, 0.2);
        color: #ff8c00;
        border-color: #ff8c00;
    }

    .rs-tooltip .tier-b {
        background-color: rgba(255, 215, 0, 0.2);
        color: #ffd700;
        border-color: #ffd700;
    }

    .rs-tooltip .tier-c {
        background-color: rgba(100, 200, 100, 0.2);
        color: #64c864;
        border-color: #64c864;
    }

    .rs-tooltip .tier-d {
        background-color: rgba(100, 150, 255, 0.2);
        color: #6496ff;
        border-color: #6496ff;
    }

    .rs-tooltip .tier-f {
        background-color: rgba(150, 75, 200, 0.2);
        color: #964bc8;
        border-color: #964bc8;
    }

/* === MEDIA QUERIES === */
@media (max-width: 768px) {
    .archive-table-container {
        max-height: 500px;
        border-radius: 10px;
        width: calc(100% - 20px);
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .tabs {
        max-width: 350px;
    }

    .shrine-row {
        height: 90px;
    }

    .shrine-date-cell {
        width: 140px;
        min-width: 120px;
        padding: 8px 10px;
    }

    .shrine-date {
        font-size: 12px;
    }

    .perks-container {
        padding: 8px 10px;
        width: auto;
    }

    .perks-scroll-wrapper {
        gap: 15px;
        padding: 3px;
        max-width: calc(100vw - 160px);
    }

    .archive-perk {
        min-width: 65px;
        gap: 4px;
    }

        .archive-perk img {
            width: 40px;
            height: 40px;
        }

    .archive-perk-name {
        font-size: 10px;
        max-width: 65px;
    }

    .shrine-row::after {
        left: 10px;
        right: 10px;
    }

    h1 {
        font-size: 28px;
    }

    #timer-text, #time-left {
        font-size: 14px;
    }

    #timer-container {
        max-width: 350px;
    }

    #card-container {
        width: 350px;
        height: 350px;
        margin-top: 50px;
    }

    .card {
        width: 130px;
        height: 130px;
    }

        .card img {
            width: 120px;
            height: 120px;
        }

    .rs-tooltip {
        max-width: 90%;
        min-width: 280px;
        padding: 22px 20px 20px;
    }

        .rs-tooltip .tooltip-header {
            padding-right: 35px;
            margin-bottom: 18px;
            padding-bottom: 14px;
        }

        .rs-tooltip .tooltip-close {
            top: 14px;
            right: 16px;
            width: 30px;
            height: 30px;
            font-size: 19px;
            background: rgba(255, 255, 255, 0.12);
        }

        .rs-tooltip .character-icon {
            width: 30px;
            height: 30px;
        }

        .rs-tooltip .tooltip-title {
            font-size: 19px;
            line-height: 1.2;
            padding-right: 8px;
        }

        .rs-tooltip .tooltip-character {
            font-size: 13.5px;
            padding-right: 8px;
        }

        .rs-tooltip .tooltip-content .quote {
            font-size: 12.5px;
            margin: 11px 0;
        }

        .rs-tooltip .tooltip-content p {
            font-size: 13.5px;
            line-height: 1.5;
        }

        .rs-tooltip .price-tier-row {
            margin-top: 14px;
            padding-top: 14px;
        }

        .rs-tooltip .price {
            font-size: 14px;
        }

        .rs-tooltip .tier {
            padding: 0.35rem 0.9rem;
            font-size: 0.75rem;
        }
}

@media (max-width: 480px) {
    .archive-table-container {
        max-height: 380px;
        width: 100%;
        max-width: calc(100vw - 20px);
        margin: 0 auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

        .archive-table-container::-webkit-scrollbar {
            display: none;
        }

    .shrine-row {
        height: 80px;
    }

    .shrine-date-cell {
        width: 120px;
        min-width: 100px;
        padding: 6px 8px;
    }

    .shrine-date {
        font-size: 11px;
    }

    .perks-scroll-wrapper {
        gap: 12px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

        .perks-scroll-wrapper::-webkit-scrollbar {
            display: none;
        }

    .archive-perk {
        min-width: 55px;
    }

        .archive-perk img {
            width: 35px;
            height: 35px;
        }

    .archive-perk-name {
        font-size: 9px;
        max-width: 55px;
    }

    .shrine-row::after {
        left: 8px;
        right: 8px;
    }

    .perks-scroll-wrapper::after {
        content: '';
        min-width: 10px;
        height: 1px;
        flex-shrink: 0;
    }

    h1 {
        font-size: 24px;
    }

    #card-container {
        width: 300px;
        height: 300px;
        margin-top: 40px;
    }

    .card {
        width: 110px;
        height: 110px;
    }

        .card img {
            width: 100px;
            height: 100px;
        }

    .rs-tooltip {
        padding: 20px 18px 18px;
        min-width: 260px;
    }

        .rs-tooltip .tooltip-header {
            padding-right: 40px;
            margin-bottom: 15px;
            padding-bottom: 12px;
        }

        .rs-tooltip .tooltip-close {
            top: 12px;
            right: 12px;
            width: 28px;
            height: 28px;
            font-size: 18px;
            background: rgba(255, 255, 255, 0.15);
        }

        .rs-tooltip .tooltip-title {
            font-size: 18px;
            line-height: 1.2;
            padding-right: 10px;
        }

        .rs-tooltip .tooltip-character {
            font-size: 13px;
            padding-right: 10px;
        }

        .rs-tooltip .tooltip-content .quote {
            font-size: 12px;
            margin: 10px 0;
        }

        .rs-tooltip .tooltip-content p {
            font-size: 13px;
            line-height: 1.5;
        }

        .rs-tooltip .price-tier-row {
            margin-top: 10px;
            padding-top: 10px;
        }

        .rs-tooltip .price {
            font-size: 13px;
        }

        .rs-tooltip .tier {
            padding: 0.25rem 0.7rem;
            font-size: 0.7rem;
        }
}

/* === ПОДВАЛ === */
@media (min-width: 768px) {
    #contact-info .info-card > div {
        flex-direction: row;
        align-items: center;
    }

    #contact-info .info-card ul {
        margin-bottom: 0;
    }

    #contact-info p {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 767px) {
    #contact-info .info-card > div {
        flex-direction: column;
        gap: 15px;
    }
}