/* Add Google Font for more authentic look */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Cinzel', 'Times New Roman', serif;
    background: 
        radial-gradient(circle at 20% 50%, rgba(60, 40, 20, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(40, 30, 15, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, #0a0805 0%, #1a1610 50%, #0f0d09 100%);
    background-attachment: fixed;
    color: #d4c4a8;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(40, 30, 20, 0.03) 2px, rgba(40, 30, 20, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(40, 30, 20, 0.03) 2px, rgba(40, 30, 20, 0.03) 4px);
    pointer-events: none;
    z-index: 0;
}

header {
    background: 
        linear-gradient(to bottom, rgba(20, 15, 10, 0.95) 0%, rgba(15, 12, 8, 0.95) 100%);
    padding: 2rem;
    text-align: center;
    border-bottom: 3px solid #8b6f47;
    box-shadow: 
        inset 0 -2px 0 rgba(139, 111, 71, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

header::before,
header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    width: 30px;
    height: 3px;
    background: #8b6f47;
    box-shadow: 0 0 10px rgba(139, 111, 71, 0.5);
}

header::before {
    left: 10%;
    transform: skewX(-20deg);
}

header::after {
    right: 10%;
    transform: skewX(20deg);
}

header h1 {
    font-size: 2.5rem;
    color: #d4a574;
    text-shadow: 
        0 0 10px rgba(212, 165, 116, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.8),
        -1px -1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.subtitle {
    color: #8b7355;
    font-size: 1.1rem;
    font-style: italic;
    letter-spacing: 1px;
}

main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.character-card {
    background: 
        linear-gradient(135deg, rgba(25, 20, 15, 0.95) 0%, rgba(20, 16, 12, 0.95) 100%);
    border: 2px solid #5c4a35;
    border-radius: 0;
    padding: 1.5rem;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(139, 111, 71, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(92, 74, 53, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(92, 74, 53, 0.05) 10px, rgba(92, 74, 53, 0.05) 20px);
    pointer-events: none;
    opacity: 0.3;
}

.character-card::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 1px solid rgba(139, 111, 71, 0.1);
    pointer-events: none;
}

.character-card:hover {
    border-color: #8b6f47;
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(139, 111, 71, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(139, 111, 71, 0.2);
    transform: translateY(-2px);
}

.character-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #5c4a35;
    position: relative;
    z-index: 1;
}

.character-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139, 111, 71, 0.3), transparent);
}

.character-header h2 {
    color: #d4a574;
    font-size: 1.8rem;
    text-shadow: 
        0 0 8px rgba(212, 165, 116, 0.3),
        1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 600;
    letter-spacing: 1px;
}

.class-badge {
    padding: 0.4rem 1rem;
    border-radius: 0;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    border: 1px solid;
    letter-spacing: 1px;
    position: relative;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.4);
}

.class-badge.rogue {
    background: linear-gradient(135deg, rgba(60, 80, 40, 0.8), rgba(40, 60, 25, 0.8));
    color: #9db86f;
    border-color: #6b8e4a;
    text-shadow: 0 0 5px rgba(157, 184, 111, 0.5);
}

.class-badge.sorceress {
    background: linear-gradient(135deg, rgba(40, 50, 80, 0.8), rgba(25, 35, 60, 0.8));
    color: #7a9bc4;
    border-color: #4a5a7a;
    text-shadow: 0 0 5px rgba(122, 155, 196, 0.5);
}

.class-badge.warrior {
    background: linear-gradient(135deg, rgba(80, 50, 40, 0.8), rgba(60, 35, 25, 0.8));
    color: #c49a7a;
    border-color: #8a5a4a;
    text-shadow: 0 0 5px rgba(196, 154, 122, 0.5);
}

.character-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.stat {
    background: 
        linear-gradient(135deg, rgba(15, 12, 10, 0.8), rgba(10, 8, 6, 0.8));
    padding: 0.8rem;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #3a2f25;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139, 111, 71, 0.2), transparent);
}

.stat-label {
    font-size: 0.85rem;
    color: #8b7355;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.2rem;
    color: #d4c4a8;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.character-attributes {
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.character-attributes h3 {
    color: #d4a574;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 
        0 0 8px rgba(212, 165, 116, 0.3),
        1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 600;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.attribute {
    background: 
        linear-gradient(135deg, rgba(15, 12, 10, 0.8), rgba(10, 8, 6, 0.8));
    padding: 0.8rem;
    border-radius: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    border: 1px solid #3a2f25;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.attribute::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(139, 111, 71, 0.2), transparent);
}

.attr-name {
    font-size: 0.85rem;
    color: #8b7355;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.attr-value {
    font-size: 1.5rem;
    color: #d4a574;
    font-weight: bold;
    text-shadow: 
        0 0 8px rgba(212, 165, 116, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.5);
}

footer {
    background: 
        linear-gradient(to top, rgba(20, 15, 10, 0.95) 0%, rgba(15, 12, 8, 0.95) 100%);
    padding: 1.5rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 3px solid #8b6f47;
    color: #8b7355;
    box-shadow: 
        inset 0 2px 0 rgba(139, 111, 71, 0.3),
        0 -4px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

footer::before,
footer::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 30px;
    height: 3px;
    background: #8b6f47;
    box-shadow: 0 0 10px rgba(139, 111, 71, 0.5);
}

footer::before {
    left: 10%;
    transform: skewX(20deg);
}

footer::after {
    right: 10%;
    transform: skewX(-20deg);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .container {
        grid-template-columns: 1fr;
    }
    
    .character-stats {
        grid-template-columns: 1fr;
    }
}

