:root {
    --burgundy-bg: #1a0a0a;
    --gold-bright: #d4af37;
    --gold-muted: #8a6d3b;
    --gold-glow: rgba(212, 175, 55, 0.3);
}

body {
    background-color: var(--burgundy-bg);
    color: var(--gold-bright);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
}

@import url('https://fonts.googleapis.com');

/* --- 1. Top Navigation Bar --- */
.profile-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 10, 10, 0.85); /* Semi-transparent burgundy */
    backdrop-filter: blur(10px); /* Blur effect for 'Glassmorphism' */
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding: 15px 40px;
    margin-bottom: 50px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-back {
    color: var(--gold-muted);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.4s ease;
}

.nav-back:hover {
    color: var(--gold-bright);
    text-shadow: 0 0 10px var(--gold-glow);
    transform: translateX(-5px);
}

.arrow-btn {
    color: var(--gold-bright);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 8px 15px;
    border: 1px solid transparent;
    transition: all 0.4s ease;
}

.arrow-btn:hover {
    border: 1px solid var(--gold-bright);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 15px var(--gold-glow);
}

/* --- 2. Gallery Title & Ornament --- */
.gallery-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 80px 0 40px;
}

.gallery-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 6px;
    margin: 0;
    text-shadow: 0 0 20px var(--gold-glow);
}

.title-line {
    flex-grow: 1;
    max-width: 100px;
    height: 1px;
    background: linear-gradient(to var(--direction, right), transparent, var(--gold-muted));
}

/* Flips the gradient for the right side line */
.title-line:last-child {
    --direction: left;
}

/* Symbol Glow (The arrows and back symbols) */
.symbol {
    font-size: 1.2rem;
    vertical-align: middle;
    color: var(--gold-bright);
}


/* 1. Header & Typography */
.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.char-name {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin: 0;
    text-shadow: 0 0 15px var(--gold-glow);
}

.char-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--gold-muted);
    font-size: 1.4rem;
    margin-top: 5px;
}

/* 2. The Portrait Frame (Luxury Focal Point) */
.portrait-frame {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 600px;
    margin: 0 auto 50px;
    border: 1px solid var(--gold-muted);
    padding: 15px;
    background: linear-gradient(135deg, #221010, #1a0a0a);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--gold-muted);
}

/* Corner Ornaments (The Elite touch) */
.corner-ornament {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--gold-bright);
    z-index: 5;
}
.top-left { top: -5px; left: -5px; border-right: none; border-bottom: none; }
.bottom-right { bottom: -5px; right: -5px; border-left: none; border-top: none; }

/* --- 1. Section Headers --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 50px 0 25px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.label {
    font-family: 'Cinzel', serif; /* High-end Roman Font */
    color: var(--gold-bright);
    font-size: 1.1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-muted), transparent);
    opacity: 0.3;
}

/* --- 2. Attribute 'Etched Plates' --- */
.tag-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tag-wrapper {
    position: relative;
    overflow: hidden;
}

.tag-plate {
    display: block;
    padding: 10px 30px;
    background: rgba(26, 10, 10, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--gold-muted);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.4s ease;
}

/* Hover Effect: Turns into a glowing gold plate */
.tag-wrapper:hover .tag-plate {
    color: var(--gold-bright);
    border-color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
}

/* --- 3. The Chronicle Box --- */
.chronicle-box {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(20, 10, 10, 0.3);
    padding: 45px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.chronicle-text {
    line-height: 2;
    color: #e0d5c5; /* Creamy off-white */
    font-size: 1.05rem;
    text-align: justify;
    font-family: 'Montserrat', sans-serif;
}

/* Drop Cap: Makes it look like a manuscript */
.drop-cap {
    float: left;
    font-family: 'Playfair Display', serif;
    font-size: 4.2rem;
    line-height: 0.8;
    padding-top: 4px;
    padding-right: 12px;
    color: var(--gold-bright);
    text-shadow: 0 0 15px var(--gold-glow);
}

/* Decorative Detail */
.accent-bracket {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gold-bright);
    opacity: 0.4;
}

.top-left {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
}

.file-code {
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    color: var(--gold-muted);
    letter-spacing: 2px;
    opacity: 0.5;
}

.box-footer {
    margin-top: 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    padding-top: 15px;
    text-align: right;
}


/* 5. Mini Gallery (Framed Art style) */
.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 30px auto;
}

.mini-frame {
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 5px;
    transition: 0.4s;
}

.mini-frame:hover {
    transform: scale(1.05);
    border-color: var(--gold-bright);
    box-shadow: 0 0 20px var(--gold-glow);
}

.mini-frame img {
    width: 100%;
    display: block;
}

.label {
    font-family: 'Prata', serif;
    letter-spacing: 1px;
    font-weight: 400;
    font-size: 1.3rem;
    font-style: italic; /* Use italic for a "secret notes" vibe */
}

.collection-link-wrapper {
    display: flex;
    justify-content: center;
    margin: 60px 0;
}

.collection-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 35px;
    
    /* Elegant Plaque Styling */
    background: rgba(212, 175, 55, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 2px; /* Sharp corners for a formal look */
    
    /* Typography */
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--gold-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    
    /* Transition for the 'Illuminate' effect */
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

/* --- THE ELITE HOVER EFFECT --- */
.collection-btn:hover {
    color: var(--gold-bright);
    border-color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.08);
    
    /* Floating Glow Effect */
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 
                0 0 20px var(--gold-glow); /* Your 33% gold opacity */
    
    letter-spacing: 5px; /* Subtle 'spreading' effect */
}

/* The Animated Icon */
.lock-icon {
    font-size: 1rem;
    color: var(--gold-bright);
    transition: transform 0.6s ease;
}

.collection-btn:hover .lock-icon {
    transform: rotate(180deg) scale(1.2);
    filter: drop-shadow(0 0 5px var(--gold-bright));
}

/* Optional: Subtle Underline that expands on hover */
.collection-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
    transition: all 0.5s ease;
}

.collection-btn:hover::after {
    width: 80%;
    left: 10%;
}

.security-tag {
    overflow: hidden;
    white-space: nowrap;
    width: 0;
}
.reveal-active {
    animation: typing 2s steps(30, end) forwards;
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}


/* --- Mobile Responsive Adjustments --- */
@media screen and (max-width: 768px) {
    
    /* 1. Navigation & Headers */
    .profile-nav {
        padding: 10px 20px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .char-name {
        font-size: 2.2rem; /* Shrink from 3.5rem */
    }

    .gallery-title {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .gallery-header {
        gap: 15px;
        margin: 40px 0 20px;
    }

    /* 2. Side-by-Side Rules (The Gallery Layout) */
    .rules-gallery-layout {
        flex-direction: column; /* Stack cards vertically */
        align-items: center;
        padding: 20px 15px;
    }

    .rules-card {
        width: 100%;
        max-width: 100%;
        padding: 30px 20px; /* Less internal padding */
        min-width: unset;
    }

    /* 3. Portrait & Frames */
    .portrait-frame {
        height: auto; /* Allow image to dictate height */
        max-width: 90%;
        padding: 10px;
    }

    /* 4. Chronicle & Lore Text */
    .chronicle-box {
        padding: 25px 20px;
        margin: 0 10px;
    }

    .chronicle-text {
        text-align: left; /* Justified text looks messy on small screens */
        font-size: 0.95rem;
    }

    .drop-cap {
        font-size: 3rem;
    }

    /* 5. Grids & Tags */
    .mini-grid {
        grid-template-columns: 1fr; /* Stack mini gallery images */
        max-width: 90%;
    }

    .tag-container {
        gap: 10px;
    }

    .tag-plate {
        padding: 8px 15px;
        font-size: 0.7rem;
    }

    /* 6. Fix for Rule Items */
    .rule-item {
        gap: 15px;
    }

    .rule-num {
        font-size: 1.2rem;
        min-width: 30px;
    }
    
    /* Ensure the 'typing' elements don't cause horizontal scroll */
    .security-tag, .gallery-label {
        white-space: normal; /* Allow wrapping if name is long */
        font-size: 0.8rem;
    }
}

/* Extra small screens (Phones) */
@media screen and (max-width: 480px) {
    .char-name {
        font-size: 1.8rem;
    }
    
    .rules-card {
        border-left-width: 3px; /* Thin out the power bar */
    }
}
