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

:root {
    --parchment: #f4f1e8;
    --ink: #1a1a1a;
    --ink-fade: #4a4a4a;
    --ink-light: #7a7a7a;
    --sepia: #d4c5a9;
    --gold: #c9a961;
    --wine: #6b3745;
    --sage: #4a5f5d;
    --paper-shadow: rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Courier New', 'Courier', monospace;
    background: var(--parchment);
    color: var(--ink);
    line-height: 1.5;
    font-size: 13px;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(255, 243, 205, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 20% 30%, rgba(201, 169, 97, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(74, 95, 93, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse 400px 100px at 15% 25%, rgba(201, 169, 97, 0.06), transparent),
        radial-gradient(ellipse 350px 80px at 85% 65%, rgba(201, 169, 97, 0.05), transparent),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(26, 26, 26, 0.01) 2px, rgba(26, 26, 26, 0.01) 4px);
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 50% 50%, transparent 0%, rgba(212, 197, 169, 0.15) 100%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='paper' x='0' y='0' width='200' height='200' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 0 L200 0 L200 200 L0 200 Z' fill='none' stroke='rgba(212,197,169,0.1)' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='30' fill='rgba(201,169,97,0.02)'/%3E%3Ccircle cx='150' cy='150' r='40' fill='rgba(201,169,97,0.015)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='200' height='200' fill='url(%23paper)'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
}

.grain {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: multiply;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 1;
}

header {
    border-bottom: 3px double var(--ink);
    padding: 2rem 3rem;
    background: linear-gradient(180deg, rgba(244, 241, 232, 0.9) 0%, rgba(212, 197, 169, 0.1) 100%);
    position: relative;
}

header::before {
    content: '◈ ✦ ◈';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--gold);
    opacity: 0.4;
    letter-spacing: 0.5rem;
}

header::after {
    content: '◈ ✦ ◈';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--gold);
    opacity: 0.4;
    letter-spacing: 0.5rem;
}

.header-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 0;
    flex-wrap: wrap;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: 0.3em;
    color: var(--ink);
    text-transform: uppercase;
    text-align: center;
    text-shadow: 2px 2px 0px rgba(201, 169, 97, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.h1-text {
    display: inline-block;
}

.h1-ornament-left,
.h1-ornament-right {
    color: var(--wine);
    font-size: 0.5em;
    letter-spacing: 0.3rem;
    font-weight: 400;
}

.meta {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--ink-light);
    text-transform: uppercase;
    font-weight: 700;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 5rem;
    background: rgba(212, 197, 169, 0.2);
    border-bottom: 1px solid var(--sepia);
    border-top: 1px solid var(--sepia);
    padding: 1.25rem 3rem;
}

.stat {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--ink-fade);
    text-align: center;
}

.stat strong {
    color: var(--wine);
    font-size: 22px;
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 900;
}

.domains {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    padding: 2rem;
    gap: 0;
}

.domain {
    display: grid;
    grid-template-columns: 100px 1fr;
    border: 1px solid var(--sepia);
    padding: 0;
    text-decoration: none;
    color: var(--ink);
    background: rgba(244, 241, 232, 0.6);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.03);
}

.domain::after {
    content: '⟡';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 10px;
    color: var(--gold);
    opacity: 0.2;
}

.domain::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 243, 205, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.domain:hover::before {
    opacity: 1;
}

.domain:hover {
    background: rgba(212, 197, 169, 0.3);
    border-color: var(--gold);
    box-shadow: 
        inset 0 0 0 1px var(--gold),
        0 6px 20px rgba(201, 169, 97, 0.15),
        2px 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2;
    transform: translateY(-2px);
}

.domain:hover::after {
    opacity: 0.6;
    transform: rotate(90deg);
    transition: all 0.3s ease;
}

.domain-id {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--ink-light);
    border-right: 1px solid var(--sepia);
    background: rgba(212, 197, 169, 0.15);
    font-weight: 700;
    letter-spacing: 1px;
    gap: 0.5rem;
    position: relative;
}

.domain-id::before {
    content: attr(data-symbol);
    font-size: 32px;
    color: var(--gold);
    opacity: 0.7;
    line-height: 1;
    transition: all 0.4s ease;
    filter: drop-shadow(1px 1px 2px rgba(201, 169, 97, 0.3));
}

.domain:hover .domain-id {
    background: rgba(201, 169, 97, 0.2);
    color: var(--wine);
}

.domain:hover .domain-id::before {
    opacity: 1;
    color: var(--wine);
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(2px 2px 4px rgba(107, 55, 69, 0.4));
}

.domain-content {
    padding: 1.5rem 2rem;
    position: relative;
}

.domain-content h2 {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    color: var(--ink);
    text-transform: uppercase;
    font-family: Georgia, 'Times New Roman', serif;
    position: relative;
}

.domain-content h2::first-letter {
    font-size: 1.4em;
    color: var(--wine);
    font-weight: 900;
}

.domain-content p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--ink-fade);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
}

.count {
    font-size: 9px;
    color: var(--sage);
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}

.domain-expand {
    background: 
        linear-gradient(135deg, rgba(255, 243, 205, 0.2) 0%, transparent 50%),
        repeating-linear-gradient(
            135deg,
            rgba(244, 241, 232, 0.6),
            rgba(244, 241, 232, 0.6) 8px,
            rgba(212, 197, 169, 0.3) 8px,
            rgba(212, 197, 169, 0.3) 16px
        );
    border: 2px dashed var(--gold);
    position: relative;
}

.domain-expand .domain-id::before {
    content: '∞';
    font-size: 36px;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.domain-expand:hover {
    background: 
        linear-gradient(135deg, rgba(255, 243, 205, 0.4) 0%, rgba(201, 169, 97, 0.2) 100%),
        repeating-linear-gradient(
            135deg,
            rgba(212, 197, 169, 0.4),
            rgba(212, 197, 169, 0.4) 8px,
            rgba(201, 169, 97, 0.2) 8px,
            rgba(201, 169, 97, 0.2) 16px
        );
    border-color: var(--gold);
}

footer {
    border-top: 3px double var(--ink);
    padding: 2rem 3rem;
    background: linear-gradient(0deg, rgba(244, 241, 232, 0.9) 0%, rgba(212, 197, 169, 0.1) 100%);
    position: relative;
}

footer::before {
    content: '✤ ※ ✤';
    position: absolute;
    left: 50%;
    top: -12px;
    transform: translateX(-50%);
    font-size: 16px;
    color: var(--gold);
    background: var(--parchment);
    padding: 0 1rem;
    letter-spacing: 0.5rem;
}

footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.footer-links a {
    color: var(--ink-fade);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.footer-links a::before {
    content: '❧';
    position: absolute;
    left: -1.2rem;
    color: var(--gold);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 12px;
}

.footer-links a:hover {
    color: var(--wine);
    text-shadow: 0 0 8px rgba(107, 55, 69, 0.3);
}

.footer-links a:hover::before {
    opacity: 1;
    left: -1.5rem;
}

.footer-note {
    text-align: center;
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--ink-light);
    text-transform: uppercase;
    font-style: italic;
    position: relative;
    padding-top: 1rem;
}

.footer-note::before {
    content: '⟡ ⟡ ⟡';
    display: block;
    margin-bottom: 0.75rem;
    color: var(--gold);
    opacity: 0.3;
    letter-spacing: 1rem;
}

/* DECORATIVE CORNER FLOURISHES */
.domain-content::before {
    content: '╭';
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    color: var(--sepia);
    opacity: 0.3;
    font-size: 14px;
}

.domain-content::after {
    content: '╯';
    position: absolute;
    right: 1rem;
    bottom: 0.5rem;
    color: var(--sepia);
    opacity: 0.3;
    font-size: 14px;
}

.domain:hover .domain-content::before,
.domain:hover .domain-content::after {
    opacity: 0.6;
    color: var(--gold);
}

@media (max-width: 900px) {
    .domains {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .header-line {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1::before,
    h1::after {
        display: none;
    }
    
    header::before,
    header::after {
        font-size: 12px;
    }
    
    .stats {
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .domain-content::before,
    .domain-content::after {
        display: none;
    }
}

a:focus {
    outline: 2px solid var(--wine);
    outline-offset: 2px;
}

::selection {
    background: var(--gold);
    color: var(--parchment);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--sepia);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border: 2px solid var(--sepia);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--wine);
}

