:root {
    --bg-color: #1a1a2e;
    --panel-bg: #16213e;
    --text-color: #e94560;
    --highlight: #0f3460;
    --accent: #4ecca3;
    --font-main: 'Roboto Mono', monospace;
    --font-header: 'Press Start 2P', cursive;
}

body {
    background-color: var(--bg-color);
    color: #fff;
    font-family: var(--font-main);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.character-header {
    display: flex;
    align-items: center;
    background: var(--panel-bg);
    padding: 20px;
    border: 4px solid var(--accent);
    margin-bottom: 20px;
    box-shadow: 0 0 15px var(--accent);
}

.avatar-frame {
    width: 100px;
    height: 100px;
    border: 4px solid #fff;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    /* Ensure image stays inside */
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guild-info {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.guild-label {
    font-size: 12px;
    margin-right: 10px;
    color: #aaa;
}

.guild-logo {
    height: 30px;
    /* Adjust as needed */
    width: auto;
}

.character-info h1 {
    font-family: var(--font-header);
    font-size: 24px;
    margin: 0 0 10px 0;
    color: var(--text-color);
    text-shadow: 2px 2px #000;
}

.class-title,
.level {
    margin: 5px 0;
    font-size: 18px;
}

.highlight {
    color: var(--accent);
    font-weight: bold;
}

.btn-pixel {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: var(--text-color);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-header);
    font-size: 12px;
    border: 2px solid #fff;
    transition: transform 0.1s;
}

.btn-pixel:hover {
    transform: scale(1.05);
    background: #ff2e63;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--panel-bg);
    border: 2px solid var(--highlight);
    padding: 20px;
    position: relative;
}

.panel h2 {
    font-family: var(--font-header);
    font-size: 16px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-top: 0;
    color: var(--accent);
}

/* Stats */
.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.stat-name {
    width: 120px;
    font-weight: bold;
}

.progress-bar-container {
    flex-grow: 1;
    height: 20px;
    background: #000;
    border: 2px solid #fff;
    margin: 0 10px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--text-color);
    width: 0;
    /* Animated via JS */
    transition: width 1.5s ease-out;
}

.stat-value {
    width: 30px;
    text-align: right;
    font-weight: bold;
}

/* Inventory */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.item {
    background: #000;
    border: 1px solid var(--accent);
    padding: 10px;
    text-align: center;
    font-size: 14px;
    cursor: help;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.item .emoji {
    font-size: 24px;
    margin-bottom: 5px;
}

.item .name {
    font-size: 12px;
}

.item:hover {
    background: var(--highlight);
}

/* Quest Log */
.quest-panel {
    grid-column: 1 / -1;
}

.quest {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px dashed #555;
}

.active-quest {
    border: 2px solid var(--text-color);
    background: rgba(233, 69, 96, 0.1);
}

.quest h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.quest-location,
.quest-duration {
    margin: 0;
    font-size: 14px;
    color: #aaa;
}

.quest-objectives {
    margin-top: 10px;
    padding-left: 20px;
}

.completed-quest h3 {
    color: var(--accent);
    text-decoration: line-through;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    font-family: var(--font-header);
    font-size: 12px;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- New Styles for Expanded Content --- */

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline (Education) */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--accent);
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--bg-color);
    border: 2px solid var(--text-color);
    box-shadow: 0 0 5px var(--text-color);
}

.timeline-date {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 5px;
}

.timeline-content h3 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}

.timeline-content p {
    margin: 0;
    color: #aaa;
    font-size: 14px;
}

.timeline-content small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-style: italic;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.project-card {
    background: #000;
    border: 1px solid var(--highlight);
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--text-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.2);
}

.project-card h3 {
    margin-top: 0;
    font-size: 14px;
    color: var(--accent);
}

.project-card p {
    font-size: 12px;
    color: #ccc;
}

.click-hint {
    display: block;
    margin-top: 10px;
    font-size: 10px;
    color: var(--text-color);
    text-align: right;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .click-hint {
    opacity: 1;
}

/* Certifications Grid */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.cert-item {
    background: #1a1a2e;
    border: 1px solid #333;
    padding: 10px;
    font-size: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    transition: border-color 0.3s;
}

.cert-item:hover {
    border-color: var(--accent);
}

/* Lore List */
.lore-list {
    list-style-type: square;
    padding-left: 20px;
}

.lore-list li {
    margin-bottom: 10px;
    color: #ccc;
}

.lore-list strong {
    color: var(--accent);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--panel-bg);
    margin: 10% auto;
    padding: 20px;
    border: 2px solid var(--text-color);
    width: 80%;
    max-width: 600px;
    box-shadow: 0 0 20px var(--text-color);
    position: relative;
    animation: modalOpen 0.4s;
}

@keyframes modalOpen {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

/* Velom Easter Egg Styles */
.construction-theme {
    border: 4px dashed #ffd700;
    /* Caution tape yellow */
    background: #111;
    text-align: center;
}

.construction-theme h2 {
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.construction-icon {
    font-size: 64px;
    margin: 20px 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

.glitch-text {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #0f0;
    animation: glitch 1s linear infinite;
}

@keyframes glitch {

    2%,
    64% {
        transform: translate(2px, 0) skew(0deg);
    }

    4%,
    60% {
        transform: translate(-2px, 0) skew(0deg);
    }

    62% {
        transform: translate(0, 0) skew(5deg);
    }
}

.blink-text {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Mini-Game Styles */
.game-ui {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--accent);
    padding: 10px 15px;
    border-radius: 5px;
    z-index: 1000;
    font-family: var(--font-header);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 10px var(--accent);
}

@media (max-width: 768px) {
    .game-ui {
        top: auto;
        bottom: 70px;
        /* Above the footer */
        right: 10px;
        font-size: 10px;
        padding: 8px 12px;
    }
}

.hidden-gem {
    position: absolute;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: transform 0.2s, opacity 0.2s;
    z-index: 10;
    animation: float 3s ease-in-out infinite;
}

.hidden-gem:hover {
    transform: scale(1.2);
    opacity: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.win-theme {
    border: 4px solid #00ff00;
    background: #001100;
    text-align: center;
}

.win-theme h2 {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.reward-icon {
    font-size: 64px;
    margin: 20px 0;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}