/* ============================================
   ALTIN KARŞILAŞTIR — Design System
   Premium Dark Theme + Gold Accent
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #07070d;
    --bg-secondary: #0e0e18;
    --bg-card: #12121f;
    --bg-card-hover: #1a1a2e;
    --bg-glass: rgba(18, 18, 31, 0.7);
    --border: rgba(212, 168, 83, 0.12);
    --border-hover: rgba(212, 168, 83, 0.3);

    --gold-primary: #d4a853;
    --gold-light: #f0d48a;
    --gold-dark: #a07830;
    --gold-glow: rgba(212, 168, 83, 0.15);
    --gold-gradient: linear-gradient(135deg, #d4a853, #f0d48a, #d4a853);

    --text-primary: #f0ece4;
    --text-secondary: #9a968e;
    --text-muted: #5c5952;

    --green: #34d399;
    --green-bg: rgba(52, 211, 153, 0.1);
    --red: #f87171;
    --red-bg: rgba(248, 113, 113, 0.1);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 0 30px rgba(212, 168, 83, 0.08);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 600px 400px at 20% 10%, rgba(212, 168, 83, 0.04), transparent),
        radial-gradient(ellipse 500px 300px at 80% 60%, rgba(212, 168, 83, 0.03), transparent);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 7, 13, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    color: var(--gold-primary);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(212, 168, 83, 0.4));
}

.logo-highlight {
    color: var(--gold-primary);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Ad Slots --- */
.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    margin: 16px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.ad-slot-top {
    height: 90px;
    margin-top: 0;
}

.ad-slot-mid {
    height: 100px;
    margin: 32px auto;
}

.ad-slot-bottom {
    height: 90px;
    margin-bottom: 0;
}

.ad-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- Hero --- */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-bg);
    color: var(--green);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(52, 211, 153, 0.2);
    margin-bottom: 24px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.gold-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto 40px;
}

/* --- Ticker Row --- */
.ticker-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.ticker-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: left;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ticker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: var(--transition);
}

.ticker-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.ticker-card:hover::before {
    opacity: 1;
}

.ticker-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ticker-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}

.ticker-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
}

.ticker-change.up {
    color: var(--green);
}

.ticker-change.down {
    color: var(--red);
}

.last-update {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auto-refresh-badge {
    background: rgba(212, 168, 83, 0.08);
    color: var(--gold-primary);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* --- Comparison Section --- */
.comparison-section {
    padding: 40px 0 60px;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    min-width: 200px;
}

.tab:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.tab.active {
    border-color: var(--gold-primary);
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.1), rgba(212, 168, 83, 0.03));
    color: var(--text-primary);
    box-shadow: var(--shadow-gold);
}

.tab-icon {
    font-size: 1.5rem;
}

.tab-label {
    font-size: 1rem;
    font-weight: 700;
}

.tab-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.tab.active .tab-desc {
    color: var(--gold-primary);
}

/* --- Gold Type Cards --- */
.gold-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.gold-type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    position: relative;
    overflow: hidden;
}

.gold-type-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: var(--transition);
}

.gold-type-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.gold-type-card.active {
    border-color: var(--gold-primary);
    background: linear-gradient(180deg, rgba(212, 168, 83, 0.08), var(--bg-card));
}

.gold-type-card.active::after {
    opacity: 1;
}

.gold-type-icon {
    font-size: 2rem;
    color: var(--gold-primary);
    margin-bottom: 8px;
    filter: drop-shadow(0 0 6px rgba(212, 168, 83, 0.3));
}

.gold-type-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.gold-type-weight {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.gold-type-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--gold-primary);
    font-variant-numeric: tabular-nums;
}

/* --- Comparison Table --- */
.comparison-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.sort-badge {
    background: var(--green-bg);
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid rgba(52, 211, 153, 0.15);
}

.comparison-table {
    min-height: 200px;
}

/* Seller Row */
.seller-row {
    display: grid;
    grid-template-columns: 50px 1fr 1fr 140px;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    gap: 16px;
}

.seller-row:last-child {
    border-bottom: none;
}

.seller-row:hover {
    background: rgba(212, 168, 83, 0.03);
}

.seller-row.cheapest {
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.06), transparent);
}

.seller-rank {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
}

.seller-rank.rank-1 {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.05));
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.seller-rank.rank-2 {
    background: rgba(212, 168, 83, 0.1);
    color: var(--gold-primary);
    border: 1px solid rgba(212, 168, 83, 0.2);
}

.seller-rank.rank-3 {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.seller-rank.rank-other {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.seller-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.seller-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.seller-url {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.seller-price-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.seller-price {
    font-size: 1.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.seller-commission {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.cheapest .seller-price {
    color: var(--green);
}

.cheapest-badge {
    display: none;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green);
    background: var(--green-bg);
    padding: 2px 8px;
    border-radius: 100px;
    margin-top: 2px;
    width: fit-content;
}

.cheapest .cheapest-badge {
    display: inline-block;
}

/* Dual Price Layout (Havale/EFT vs Kredi Kartı) */
.seller-row {
    grid-template-columns: 50px 1fr 1.8fr 140px;
}

.seller-price-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    align-items: start;
}

.price-pair {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.price-label.eft-label {
    color: var(--green);
}

.price-label.card-label {
    color: #8b8fa3;
}

.eft-price {
    color: var(--green) !important;
    font-size: 1.1rem;
    font-weight: 800;
}

.card-price {
    color: #8b8fa3 !important;
    font-size: 0.95rem;
    font-weight: 600;
}

.savings-info {
    grid-column: 1 / -1;
    margin-top: 2px;
}

.savings-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--green);
    background: var(--green-bg);
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid rgba(39, 174, 96, 0.15);
}

.seller-action {
    justify-self: end;
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #0a0a0f;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
    color: #0a0a0f;
}

.btn-buy .btn-arrow {
    transition: var(--transition);
}

.btn-buy:hover .btn-arrow {
    transform: translateX(3px);
}

/* Loading */
.table-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: var(--text-muted);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Info Box --- */
.info-box {
    display: flex;
    gap: 14px;
    background: rgba(212, 168, 83, 0.05);
    border: 1px solid rgba(212, 168, 83, 0.12);
    border-radius: var(--radius-md);
    padding: 18px 22px;
}

.info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-content strong {
    color: var(--text-primary);
}

/* --- About Section --- */
.about-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.feature-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border);
    padding-top: 48px;
    margin-top: 20px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand .logo-icon,
.footer-brand .logo-text {
    font-size: 1.2rem;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--gold-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
}

.footer-bottom p {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

/* --- Price Animation --- */
@keyframes priceUp {
    0% {
        background-color: transparent;
    }

    30% {
        background-color: rgba(52, 211, 153, 0.08);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes priceDown {
    0% {
        background-color: transparent;
    }

    30% {
        background-color: rgba(248, 113, 113, 0.08);
    }

    100% {
        background-color: transparent;
    }
}

.price-flash-up {
    animation: priceUp 1.5s ease;
}

.price-flash-down {
    animation: priceDown 1.5s ease;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .ticker-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .gold-types {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 56px;
    }

    .nav {
        gap: 20px;
    }

    .nav-link {
        font-size: 0.82rem;
    }

    .hero {
        padding: 40px 0 24px;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        flex-direction: row;
        padding: 14px 24px;
        min-width: auto;
        gap: 12px;
    }

    .gold-types {
        grid-template-columns: repeat(2, 1fr);
    }

    .gold-type-card:last-child {
        grid-column: 1 / -1;
    }

    .seller-row {
        grid-template-columns: 40px 1fr;
        gap: 12px;
        padding: 16px 18px;
    }

    .seller-price-col {
        grid-column: 1 / -1;
    }

    .seller-action {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .btn-buy {
        width: 100%;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .ticker-row {
        grid-template-columns: 1fr;
    }

    .gold-types {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .tabs .tab {
        padding: 12px 16px;
    }
}