:root {
    --gold: #ffd700;
    --gold-dark: #b8860b;
    --bg-dark: #000000;
    --bg-card: #1a1b26;
    --bg-card-dark: #1e1e24;
    --bg-card-light: #2a2b36;
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --border-yellow: rgba(255, 215, 0, 0.5);
    --emerald: #10b981;
    --purple: #8358ff;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.5;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 6rem;
    padding: 0 2rem;
    background-color: #0f0f11;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    width: 5rem;
    height: 5rem;
    background-color: white;
    border-radius: 0.5rem;
    border: 2px solid var(--gold);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon { display: flex; flex-direction: column; align-items: center; }
.logo-emoji { font-size: 1.5rem; }
.logo-text { font-size: 0.65rem; font-weight: bold; color: #ef4444; }

.logo-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0.5rem; }

.nav {
    display: flex;
    background-color: #151518;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    overflow: hidden;
    padding: 4px;
    gap: 4px;
}

.nav a {
    padding: 0.75rem 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.2s;
}

.nav a:hover { color: white; background-color: rgba(255, 255, 255, 0.05); }
.nav a.active { background-color: var(--gold); color: black; font-weight: bold; }

/* Home Page */
.page-home {
    height: calc(100vh - 6rem);
    position: relative;
    overflow: hidden;
}

.home-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.home-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
}

.home-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 6rem;
    text-align: center;
}

.home-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(to bottom, var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.home-subtitle {
    max-width: 64rem;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: ui-monospace, monospace;
    line-height: 1.625;
    padding: 0 1rem;
}

/* Pricing Page */
.page-pricing {
    padding: 2rem;
    max-width: 100rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pricing-row {
    display: grid;
    gap: 1.5rem;
}

.pricing-row-large {
    grid-template-columns: repeat(2, 1fr);
}

.pricing-row-small {
    grid-template-columns: repeat(4, 1fr);
}

.pricing-card {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    border: 1px solid var(--border-yellow);
    background-color: black;
    transition: all 0.3s;
}

.pricing-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.pricing-card-large {
    min-height: 14rem;
}

.pricing-card-small {
    min-height: 9rem;
}

.card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s;
}

.pricing-card:hover .card-bg { transform: scale(1.05); }

.card-overlay { position: absolute; inset: 0; }
.gradient-right { background: linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.2)); }
.gradient-top { background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.1)); }

.card-content {
    position: relative;
    height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    padding-top: 2.5rem;
}

.card-content-small {
    padding-top: 1.5rem;
    justify-content: flex-start;
}

.card-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1.5rem;
    transform: skewX(-12deg);
    padding-left: 1rem;
    border-left: 4px solid var(--gold);
    text-transform: uppercase;
}

.card-title-small {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.tags-grid {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 0.75rem;
    width: fit-content;
}

.tags-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--gold);
    color: black;
    padding: 0.5rem 1rem;
    padding-right: 1.5rem;
    border-radius: 2px;
    font-weight: bold;
    font-size: 0.875rem;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.tag-clickable {
    cursor: pointer;
    text-decoration: none;
}

.tag-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: black;
    text-decoration: none;
    flex: 1;
}

.tag-link:hover {
    opacity: 0.8;
}

.tag-thumb {
    width: 3rem;
    height: 1.75rem;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 2px;
}

.tag-name {
    font-weight: bold;
}

.tag-price {
    opacity: 0.8;
    font-size: 0.75rem;
}

.tag-compact {
    background-color: var(--gold);
    color: black;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-weight: bold;
    font-size: 0.75rem;
}

/* Companions Page */
.page-companions {
    padding: 2rem;
    max-width: 106.25rem;
    margin: 0 auto;
}

.companions-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.top-companions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 28rem;
}

.companion-card {
    position: relative;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 2px;
    overflow: hidden;
    background-color: var(--bg-card);
}

.companion-card.rank-gold { border: 2px solid #ffd700; }
.companion-card.rank-silver { border: 2px solid #c0c0c0; }
.companion-card.rank-bronze { border: 2px solid #cd7f32; }

.companion-banner { position: absolute; inset: 0; z-index: 0; }
.rank-gold .companion-banner { background: linear-gradient(to right, rgba(184,134,11,0.3), transparent); }
.rank-silver .companion-banner { background: linear-gradient(to right, rgba(192,192,192,0.3), transparent); }
.rank-bronze .companion-banner { background: linear-gradient(to right, rgba(205,127,50,0.3), transparent); }

.companion-rank-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.companion-rank-badge.silver { background-color: #6b7280; }
.companion-rank-badge.bronze { background-color: #d97706; }

.companion-main {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    width: 100%;
}

.companion-avatar {
    width: 6rem;
    height: 8rem;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.1);
}

.companion-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding: 0.25rem 0;
}

.companion-name { color: white; font-weight: 500; font-size: 1.125rem; }
.companion-hours { color: #9ca3af; font-size: 0.75rem; margin-top: 0.25rem; }

.companion-games {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.game-tag {
    font-size: 0.625rem;
    color: var(--emerald);
    background-color: rgba(16, 185, 129, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.companion-price {
    display: flex;
    align-items: flex-end;
    gap: 0.125rem;
    margin-left: auto;
}

.companion-price .price-value {
    color: var(--gold);
    font-size: 1.875rem;
    font-weight: bold;
    line-height: 1;
}

.companion-price .price-unit {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

/* Grid */
.companions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.grid-card {
    background-color: var(--bg-card-light);
    border-radius: 0.375rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.grid-card:hover { border-color: var(--border-yellow); }

.grid-avatar-wrapper {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

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

.grid-card:hover .grid-avatar { transform: scale(1.05); }

.hearts-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.heart-icon { color: #a855f7; }

.hours-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0,0,0,0.7);
    color: #d1d5db;
    padding: 0.125rem 0.5rem;
    border-radius: 2px;
    font-size: 0.625rem;
}

.grid-info {
    padding: 0.75rem;
    background-color: var(--bg-card-dark);
}

.grid-name {
    color: #e5e7eb;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

.grid-game {
    font-size: 0.75rem;
    color: var(--emerald);
    border: 1px solid rgba(16,185,129,0.3);
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    background-color: rgba(16,185,129,0.1);
}

.grid-price { display: flex; align-items: baseline; gap: 2px; }
.grid-price-value { font-size: 1.25rem; font-weight: bold; color: var(--gold); }
.grid-price-unit { font-size: 0.75rem; color: var(--text-gray); }

/* Image Preview Modal */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.image-preview-modal.show { display: flex; }
.image-preview-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
}
.preview-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Detail Modal */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.detail-modal.show { display: flex; }
.detail-content {
    background: var(--bg-card);
    border: 1px solid var(--border-yellow);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.detail-content img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.detail-content a { color: var(--gold); }
.detail-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

.grid-price .price-value { color: var(--gold); font-size: 1.125rem; font-weight: bold; line-height: 1; }
.grid-price .price-unit { color: #6b7280; font-size: 0.625rem; }

/* Responsive */
@media (min-width: 640px) { .companions-grid { grid-template-columns: repeat(3, 1fr); } }

@media (min-width: 1024px) {
    .companions-layout { flex-direction: row; }
    .top-companions { flex-shrink: 0; }
    .companions-grid { flex: 1; grid-template-columns: repeat(4, 1fr); }
    .home-title { font-size: 5rem; }
}

@media (min-width: 1280px) {
    .companions-grid { grid-template-columns: repeat(5, 1fr); }
    .home-title { font-size: 6rem; }
    .pricing-card { min-height: 18rem; }
}

@media (max-width: 1024px) {
    .pricing-row-large { grid-template-columns: 1fr; }
    .pricing-row-small { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header { flex-direction: column; height: auto; padding: 1rem; gap: 1rem; }
    .nav { width: 100%; justify-content: center; }
    .nav a { padding: 0.5rem 1rem; font-size: 0.75rem; }
    .card-title { font-size: 1.25rem; }
    .card-title-small { font-size: 1rem; }
    .home-title { font-size: 2.5rem; }
    .top-companions { max-width: 100%; }
    .companion-avatar { width: 4rem; height: 5.5rem; }
}

@media (max-width: 640px) {
    .pricing-row-large, .pricing-row-small { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .nav a { padding: 0.5rem 0.75rem; }
    .home-title { font-size: 2rem; }
    .home-subtitle { font-size: 0.625rem; letter-spacing: 0.1em; }
}
