:root {
    --primary-color: #d4af37;
    /* Gold */
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-color: #8b0000;
    /* Dark Red */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    text-align: center;
}

header {
    padding: 20px;
    border-bottom: 2px solid var(--primary-color);
    background: linear-gradient(to bottom, #1a1a1a, #000);
}

.app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

main {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    flex: 1;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Class Selection */
.class-cards {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    background-color: var(--card-bg);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s;
    width: 200px;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Controls */
.controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    width: 100%;
    justify-content: space-between;
}

.level-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="number"] {
    background: #000;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px;
    font-size: 1.2rem;
    width: 80px;
    text-align: center;
}

button {
    background: #333;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: background 0.3s;
}

button:hover {
    background: var(--primary-color);
    color: #000;
}

/* Skill Tree */
.skill-tree-container {
    width: 100%;
    overflow-x: auto;
    background: #000;
    /* Pure black as requested */
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    padding: 40px;
    min-height: 600px;
    position: relative;
}

.skill-tree {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 4 Columns */
    grid-template-rows: repeat(4, 1fr);
    /* 6 Rows */
    gap: 30px;
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.skill-node {
    position: relative;
    width: 64px;
    height: 64px;
    margin: auto;
    cursor: pointer;
    transition: filter 0.3s;
}

.skill-node img {
    width: 100%;
    height: 100%;
    border: 2px solid #555;
    border-radius: 4px;
}

.skill-node.locked img {
    filter: grayscale(100%) brightness(0.5);
    border-color: #333;
}

.skill-node.available img {
    filter: grayscale(0%);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.skill-node.maxed img {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.skill-level {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #000;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--primary-color);
    padding: 15px;
    width: 300px;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    display: none;
}

.tooltip h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-family: 'Cinzel', serif;
}

.tooltip .meta {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.tooltip .desc {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ddd;
}

.tooltip .next-level {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Class Selection */
.class-cards {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    background-color: var(--card-bg);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s;
    width: 200px;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Controls */
.controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    width: 100%;
    justify-content: space-between;
}

.level-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="number"] {
    background: #000;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px;
    font-size: 1.2rem;
    width: 80px;
    text-align: center;
}

button {
    background: #333;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    transition: background 0.3s;
}

button:hover {
    background: var(--primary-color);
    color: #000;
}

/* Skill Tree */
.skill-tree-container {
    width: 100%;
    overflow-x: auto;
    background: #000;
    /* Pure black as requested */
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    padding: 40px;
    min-height: 600px;
    position: relative;
}

.skill-tree {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 4 Columns */
    grid-template-rows: repeat(4, 1fr);
    /* 6 Rows */
    gap: 30px;
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.skill-node {
    position: relative;
    width: 64px;
    height: 64px;
    margin: auto;
    cursor: pointer;
    transition: filter 0.3s;
}

.skill-node img {
    width: 100%;
    height: 100%;
    border: 2px solid #555;
    border-radius: 4px;
}

.skill-node.locked img {
    filter: grayscale(100%) brightness(0.5);
    border-color: #333;
}

.skill-node.available img {
    filter: grayscale(0%);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.skill-node.maxed img {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.skill-level {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #000;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--primary-color);
    padding: 15px;
    width: 300px;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    display: none;
}

.tooltip h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-family: 'Cinzel', serif;
}

.tooltip .meta {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.tooltip .desc {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ddd;
}

.tooltip .next-level {
    margin-top: 10px;
    color: #888;
    font-style: italic;
}

.tooltip .req {
    margin-top: 10px;
    color: var(--accent-color);
    font-weight: bold;
}

/* Arrow Connections */
.skill-arrows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.skill-arrow-path {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.8;
}
