/* UTDValues.com - Discord + Roblox Style Theme */

/* Variables */
:root {
    /* Backgrounds */
    --bg-color: #1a1c1f;
    /* Deep Discord Grey */
    --card-bg: #2b2d31;
    /* Lighter Card Grey */
    --input-bg: #1e1f22;
    /* Input/Table Darker Grey */

    /* Text */
    --text-main: #ffffff;
    --text-muted: #b9bbbe;

    /* Accents */
    --accent-discord: #5865F2;
    /* Blurple */
    --accent-roblox: #00b06f;
    /* Green */
    --accent-roblox-hover: #009e63;

    /* Rarities */
    --rarity-mythic: #FFD700;
    /* Gold */
    --rarity-legendary: #FF4500;
    /* Red Orange */
    --rarity-epic: #9370DB;
    /* Purple */

    /* Spacing & sizing */
    --radius-card: 12px;
    --radius-btn: 4px;
    --container-width: 1100px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: var(--input-bg);
    border-bottom: 1px solid #111;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    color: var(--accent-discord);
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.btn-discord {
    background-color: var(--accent-discord);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    font-size: 0.9rem !important;
    transition: background-color 0.2s !important;
}

.btn-discord:hover {
    background-color: #4752c4;
}

/* Main Content */
.main-content {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.fan-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #b9bbbe;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero h1 .highlight {
    color: var(--accent-discord);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Section Title */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    margin-top: 0;
    color: var(--text-normal);
}

.section-title .icon {
    margin-right: 8px;
}

/* Components: Card */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

.badge-success {
    background-color: rgba(0, 176, 111, 0.15);
    color: var(--accent-roblox);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-hot {
    background-color: rgba(255, 69, 0, 0.15);
    color: #ff4500;
    border: 1px solid rgba(255, 69, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 8px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--input-bg);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2b2d31;
}

.data-table th {
    background-color: #111214;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* 失效码行样式 - 整行变暗 */
.expired-row {
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 0.5;
}

.expired-row:hover {
    opacity: 0.6;
}

.code-box {
    background-color: #2b2d31;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #fff;
    border: 1px solid #3f4147;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.code-box:hover {
    background-color: #36383f;
    border-color: var(--accent-discord);
}

.copy-icon {
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.code-box:hover .copy-icon {
    opacity: 1;
}

.code-box.copied {
    background-color: var(--accent-roblox);
    border-color: var(--accent-roblox);
}

.status-active {
    color: var(--accent-roblox);
    font-weight: 600;
    font-size: 0.9rem;
}

.status-expired {
    color: #72767d;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: line-through;
}

/* Alert Box */
.alert-box {
    background-color: rgba(88, 101, 242, 0.1);
    border-left: 4px solid var(--accent-discord);
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 24px;
    color: #dedede;
    font-size: 0.95rem;
}

/* Unit Grid */
.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.unit-card {
    background-color: var(--input-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.unit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: #3f4147;
}

.unit-image-placeholder {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    background-size: cover;
    background-position: center;
}

.unit-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a;
}

.unit-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Rarity Backgrounds/Accents */
.mythic-bg {
    background: linear-gradient(45deg, #FFD700, #B8860B);
}

.legendary-bg {
    background: linear-gradient(45deg, #FF4500, #8B0000);
}

.epic-bg {
    background: linear-gradient(45deg, #9370DB, #4B0082);
}

.unit-info {
    padding: 16px;
}

.unit-info h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

/* Rarity Text Colors */
.rarity-text-mythic {
    color: var(--rarity-mythic);
}

.rarity-text-legendary {
    color: var(--rarity-legendary);
}

.rarity-text-epic {
    color: var(--rarity-epic);
}

.unit-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.stat-row span:first-child {
    color: var(--text-muted);
}

.val-calculating {
    color: var(--accent-discord);
    font-style: italic;
}

.val-high {
    color: var(--accent-roblox);
    font-weight: 600;
}

.val-tbd {
    color: var(--text-muted);
}

/* Gallery Filler */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.gallery-item {
    background-color: var(--input-bg);
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #4f545c;
    font-size: 0.8rem;
    border: 2px solid transparent;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    border-color: var(--accent-discord);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* FAQ Styles */
.faq-item {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(47, 49, 54, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-normal);
    background-color: transparent;
    transition: all 0.2s ease;
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: "›";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    transition: transform 0.3s ease;
    color: var(--accent-discord);
    font-size: 1.5em;
    font-weight: bold;
    flex-shrink: 0;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item summary:hover {
    color: #fff;
    background-color: rgba(88, 101, 242, 0.08);
}

.faq-item[open] summary {
    background-color: rgba(88, 101, 242, 0.1);
    color: #fff;
}

.faq-item p {
    padding: 0 16px 13px 40px;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
    animation: fadeIn 0.3s ease;
}

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

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

.faq-item p a {
    color: var(--accent-discord);
    text-decoration: none;
    transition: color 0.2s ease;
}

.faq-item p a:hover {
    color: #7289da;
    text-decoration: underline;
}

/* Footer Section */
footer {
    text-align: center;
    color: #72767d;
    font-size: 0.85rem;
    padding-bottom: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 16px;
    }

    /* Unit grid: 双列布局（一行两个） */
    .unit-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Gallery grid: 同样双列，不要太多小方块 */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* 表格：强制横向滚动，不换行 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* iOS 平滑滚动 */
    }

    .data-table {
        min-width: 500px;
        /* 强制表格最小宽度，触发横向滚动 */
    }

    .data-table th,
    .data-table td {
        white-space: nowrap;
        /* 防止文字换行 */
        padding: 10px 12px;
        /* 稍微减小内边距节省空间 */
    }

    .nav-links {
        display: none;
    }
}