@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');

/* Color Palette - Updated with Fantasy Theme */
:root {
    /* Backgrounds from original theme */
    --bg-dark: #2b2621; /* Mapped from --primary-color */
    --bg-medium: #4b453d; /* Mapped from --secondary-color */

    /* Mapped neon colors to the new gold/red palette */
    --neon-green: #c49942;   /* Was primary text/border, now gold accent */
    --dark-green: #4b453d;   /* Was button bg, now secondary bg color */
    --neon-yellow: #c49942;  /* Was heading accent, now gold accent */
    --neon-red: #a32d2c;     /* Mapped to red accent */
    --neon-magenta: #a32d2c; /* Mapped to red accent */
    --neon-blue: #c49942;    /* Mapped to gold accent for consistency */

    /* New text color from original theme */
    --text-color: #f0e6c2;

    /* Shadow colors updated to match the gold accent */
    --text-shadow-color: rgba(196, 153, 66, 0.5);
    --box-shadow-color: rgba(196, 153, 66, 0.3);
}

/* Typography - Updated with Cinzel font and new text color */
body {
    font-family: 'Cinzel', serif; /* Changed from Orbitron */
    background-color: var(--bg-dark);
    color: var(--text-color); /* Changed from neon-green to the dedicated text color */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

h1, h2, h3, h4 {
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--text-shadow-color);
    margin-bottom: 15px;
}

h3 {
    color: var(--neon-yellow);
}

p, span, li, label {
    color: var(--text-color); /* Updated to use the new text color */
    text-shadow: 0 0 3px var(--text-shadow-color);
    line-height: 1.6;
}

/* Global Layout */
.game-container {
    background-color: var(--bg-medium);
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 15px var(--box-shadow-color);
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

/* HUD (Navigation and Logo) */
.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--neon-green);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    margin: 0;
    font-size: 2.2em;
    color: var(--neon-yellow);
    text-shadow: 0 0 8px rgba(196, 153, 66, 0.8); /* Updated shadow color */
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    vertical-align: middle;
    border-radius: 5px;
}


.main-nav {
    display: flex;
    gap: 15px;
}

.menu-btn {
    background-color: var(--dark-green);
    color: var(--text-color); /* Updated text color */
    border: 1px solid var(--neon-green);
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
    font-size: 0.95em;
    text-shadow: 0 0 3px var(--text-shadow-color);
    white-space: nowrap;
}

.menu-btn:hover {
    background-color: #d6ab52; /* Using the button hover color from the first file */
    color: var(--bg-dark);
    box-shadow: 0 0 10px var(--box-shadow-color);
    transform: translateY(-2px);
}

/* Game Screen Management (for main content areas) */
.game-screen {
    display: none;
    flex-direction: column;
    flex-grow: 1;
}

.game-screen.active-screen {
    display: flex;
}

/* Hero Card Specifics */
.hero-profile-card {
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    margin-top: 20px;
}

.hero-profile-card h2 {
    font-size: 2em;
    margin-bottom: 25px;
    color: var(--neon-yellow);
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: stretch;
}

.image-placeholder-left {
    flex: 1;
    min-width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}


.hero-details {
    flex: 2;
    text-align: left;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-details li {
    background-color: rgba(196, 153, 66, 0.05); /* Updated to gold tint */
    padding: 8px 15px;
    margin-bottom: 8px;
    border: 1px solid rgba(196, 153, 66, 0.3); /* Updated to gold tint */
    border-radius: 4px;
    font-size: 1em;
    flex-grow: 0;
    display: flex;
    align-items: center;
}

.hero-details li:last-child {
    margin-bottom: 0;
}

.hero-details li strong {
    margin-right: 0.3em;
}

.image-placeholder-bottom {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.data-viz-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

/* Footer Styling */
.main-footer {
    width: 100%;
    max-width: 1200px;
    background-color: var(--bg-medium);
    border-top: 1px solid var(--neon-green);
    padding: 15px 20px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 0 10px var(--box-shadow-color);
    border-radius: 0 0 8px 8px;
}

.footer-content p {
    margin: 0;
    font-size: 0.9em;
}

.footer-link {
    color: var(--neon-yellow);
    text-decoration: none;
    text-shadow: 0 0 3px rgba(196, 153, 66, 0.5); /* Updated shadow color */
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--neon-green);
    text-shadow: 0 0 5px var(--text-shadow-color);
}

/* Modal Styling for Privacy Policy */
.modal-backdrop {
    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);
    -webkit-backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: var(--bg-dark);
    border: 2px solid var(--neon-magenta);
    box-shadow: 0 0 20px rgba(163, 45, 44, 0.7); /* Updated shadow color to red */
    border-radius: 8px;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
    color: var(--text-color); /* Updated text color */
    text-shadow: 0 0 3px var(--text-shadow-color);
}

.modal-content h2 {
    color: var(--neon-magenta);
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.2em;
}

.modal-content h3 {
    color: var(--neon-yellow);
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-content p {
    margin-bottom: 10px;
}

.modal-content ul {
    list-style-type: '⚜️ '; /* Changed icon to fit theme */
    padding-left: 25px;
    margin-bottom: 20px;
}

.modal-content li {
    background-color: transparent;
    border: none;
    padding: 5px 0;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.close-btn {
    color: var(--neon-yellow);
    font-size: 2.5em;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.3s, text-shadow 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .game-container {
        padding: 15px;
        max-width: 95%;
    }

    .hud {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .logo {
        flex-direction: row;
        gap: 5px;
    }

    .logo h1 {
        font-size: 1.8em;
        gap: 5px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .main-nav {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .menu-btn {
        width: 100%;
        text-align: center;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .image-placeholder-left {
        width: 100%;
        height: 200px;
        min-width: unset;
    }
    .image-placeholder-left img.hero-card {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-details {
        width: 100%;
        min-width: unset;
    }

    .hero-profile-card h2 {
        font-size: 1.8em;
    }

    .main-footer {
        padding: 10px 15px;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }
    .modal-content h2 {
        font-size: 1.8em;
    }
    .close-btn {
        font-size: 2em;
        top: 5px;
        right: 10px;
    }

    .image-placeholder-bottom {
        width: 100%;
        padding: 5px;
    }
    .data-viz-image {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.6em;
    }

    .logo-icon {
        width: 25px;
        height: 25px;
    }

    .menu-btn {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    .hero-profile-card h2 {
        font-size: 1.6em;
    }

    .hero-details li {
        font-size: 0.95em;
        padding: 10px 12px;
    }
}

/* --- Mission Section Styling --- */
.mission-screen {
    background-color: var(--bg-medium);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 15px rgba(196, 153, 66, 0.5); /* Updated shadow color */
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    text-align: left;
}

.mission-screen h2 {
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(196, 153, 66, 0.7); /* Updated shadow color */
    font-size: 2.2em;
    margin-bottom: 25px;
    text-align: center;
}

.mission-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.mission-content p {
    color: var(--text-color);
    font-size: 1.05em;
    max-width: 800px;
    text-align: justify;
}

.mission-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 800px;
}

.mission-content li {
    background-color: rgba(196, 153, 66, 0.05); /* Updated to gold tint */
    border: 1px solid rgba(196, 153, 66, 0.3); /* Updated to gold tint */
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1em;
    line-height: 1.5;
}

/* --- CredNet Screen Styling --- */
.crednet-screen {
    background-color: var(--bg-medium);
    border: 1px solid var(--neon-yellow);
    box-shadow: 0 0 15px rgba(196, 153, 66, 0.5); /* Updated shadow color */
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    text-align: center;
}

.crednet-screen h2 {
    color: var(--neon-yellow);
    text-shadow: 0 0 8px rgba(196, 153, 66, 0.7); /* Updated shadow color */
    font-size: 2.2em;
    margin-bottom: 25px;
}

.faction-table-container {
    width: 100%;
    margin-top: 20px;
    border: 1px solid var(--neon-green);
    border-radius: 8px;
    box-shadow: 0 0 10px var(--box-shadow-color);
}

#faction-data-table {
    width: 100%;
    border-collapse: collapse;
}

#faction-data-table th,
#faction-data-table td {
    border: 1px solid rgba(196, 153, 66, 0.3); /* Updated border color */
    padding: 12px;
	padding-left: 6px;
    padding-top: 30px;
    text-align: left;
    vertical-align: top;
    color: var(--text-color);
    font-size: 0.95em;
    line-height: 1.4;
}

#faction-data-table td[data-label="Description"]::before {
    display: block;
    margin-bottom: 5px;
	top: 6px;
	left: 6px;
	width: calc(100% - 12px);
	text-align: center;
	padding-bottom: 5px;
	border-bottom: 1px solid var(--neon-yellow);
}

#faction-data-table th {
    background-color: #2b2621; /* Darker bg for header */
    color: var(--neon-yellow);
    text-shadow: 0 0 5px rgba(196, 153, 66, 0.5); /* Updated shadow color */
    font-size: 1.1em;
    position: sticky;
    top: 0;
    z-index: 1;
}

#faction-data-table tbody tr:nth-child(even) {
    background-color: rgba(196, 153, 66, 0.03); /* Updated stripe color */
}

#faction-data-table tbody tr:hover {
    background-color: rgba(196, 153, 66, 0.1); /* Updated hover color */
}

.raid-boss-entry {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed rgba(196, 153, 66, 0.1);
}

.raid-boss-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.raid-boss-name {
    font-weight: bold;
    color: var(--neon-magenta);
    text-shadow: 0 0 5px rgba(163, 45, 44, 0.5); /* Updated shadow color */
}

.raid-boss-description {
    font-style: italic;
    font-size: 0.85em;
    color: var(--text-color); /* Use standard text color */
}

@media (max-width: 768px) {
    .crednet-screen {
        padding: 15px;
    }
    .crednet-screen h2 {
        font-size: 1.8em;
    }
    #faction-data-table th,
    #faction-data-table td {
        padding: 8px;
        font-size: 0.9em;
    }
    .raid-boss-description {
        font-size: 0.8em;
    }

    #faction-data-table,
    #faction-data-table thead,
    #faction-data-table tbody,
    #faction-data-table th,
    #faction-data-table td,
    #faction-data-table tr {
        display: block;
    }

    #faction-data-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    #faction-data-table tr {
        border: 1px solid rgba(196, 153, 66, 0.3);
        margin-bottom: 15px;
        border-radius: 8px;
        overflow: hidden;
        background-color: rgba(196, 153, 66, 0.05);
    }

    #faction-data-table td {
        border: none;
        border-bottom: 1px dashed rgba(196, 153, 66, 0.1);
        position: relative;
        text-align: right;
        padding-left: 100px;
    }

    #faction-data-table td:last-child {
        border-bottom: none;
    }

    #faction-data-table td::before {
        content: attr(data-label);
        position: absolute;
        top: 8px;
        left: 6px;
        width: 90px;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--neon-yellow);
        text-shadow: 0 0 3px rgba(196, 153, 66, 0.5);
    }
    
    #faction-data-table td[data-label="Raid Bosses"] {
        text-align: left;
        padding-left: 6px;
        padding-top: 30px;
    }

    #faction-data-table td[data-label="Raid Bosses"]::before {
        top: 6px;
        left: 6px;
        width: calc(100% - 12px);
        text-align: center;
        font-size: 1.1em;
        border-bottom: 1px solid var(--neon-magenta);
        padding-bottom: 5px;
    }
	  #faction-data-table td[data-label="Description"]::before {
      top: 6px;
      left: 6px;
      width: calc(100% - 12px);
      text-align: center;
      font-size: 1.1em;
      border-bottom: 1px solid var(--neon-magenta);
      padding-bottom: 5px;
	}
	#faction-data-table td[data-label="Description"] {
      padding-top: 34px;
	}
	#faction-data-table td[data-label="Shop Items"] {
	  text-align: left;
	  padding-left: 6px;
      padding-top: 34px;
	}
	#faction-data-table td[data-label="Shop Items"]::before {
      top: 6px;
      left: 6px;
      width: calc(100% - 12px);
      text-align: center;
      font-size: 1.1em;
      border-bottom: 1px solid var(--neon-magenta);
      padding-bottom: 5px;
	}
}

@media (max-width: 480px) {
    .crednet-screen h2 {
        font-size: 1.6em;
    }
    #faction-data-table th,
    #faction-data-table td {
        padding: 6px;
        font-size: 0.85em;
    }
    #faction-data-table td[data-label="Raid Bosses"]::before {
        font-size: 1em;
    }
    #faction-data-table td[data-label="Description"] { 
        padding-top: 36px; 
    }
}

/* --- Data Hub Screen Styling --- */
.data-hub-screen {
    background-color: var(--bg-medium);
    border: 1px solid var(--neon-green);
    box-shadow: 0 0 15px var(--box-shadow-color);
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    text-align: left;
}

.data-hub-screen h2 {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--text-shadow-color);
    font-size: 2.2em;
    margin-bottom: 25px;
    text-align: center;
}

.data-hub-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.data-hub-section {
    background-color: rgba(196, 153, 66, 0.05);
    border: 1px solid rgba(196, 153, 66, 0.3);
    border-radius: 6px;
    padding: 20px;
}

.data-hub-section h3 {
    color: var(--neon-yellow);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}

.data-hub-section ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.data-hub-section li {
    background-color: transparent;
    border: none;
    padding: 5px 0;
    margin-bottom: 5px;
    font-size: 1em;
}

.data-hub-section li strong {
    color: var(--neon-yellow); /* Changed from --neon-magenta for consistency */
}

@media (max-width: 768px) {
    .data-hub-screen {
        padding: 15px;
    }
    .data-hub-screen h2 {
        font-size: 1.8em;
    }
    .data-hub-section {
        padding: 15px;
    }
    .data-hub-section h3 {
        font-size: 1.5em;
    }
}

/* --- Discover Gallery Screen Styling --- */
.discover-gallery-screen {
    background-color: var(--bg-medium);
    border: 1px solid var(--neon-yellow);
    box-shadow: 0 0 15px rgba(196, 153, 66, 0.5);
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    text-align: center;
}

.discover-gallery-screen h2 {
    color: var(--neon-yellow);
    text-shadow: 0 0 8px rgba(196, 153, 66, 0.7);
    font-size: 2.2em;
    margin-bottom: 25px;
}

.bgm-player {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    border: 1px dashed var(--neon-green);
    border-radius: 5px;
    background-color: rgba(196, 153, 66, 0.05);
}

.bgm-player label {
    font-size: 1.1em;
    color: var(--neon-yellow);
    text-shadow: 0 0 3px rgba(196, 153, 66, 0.5);
}

.bgm-player audio {
    width: 80%;
    max-width: 400px;
    filter: none; /* Removing filter as it won't match the new theme */
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px auto;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 15px rgba(196, 153, 66, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.slideshow-img {
    width: 100%;
    height: auto;
    max-height: 400px;
	object-fit: contain;
    display: none;
    border-radius: 6px;
    transition: opacity 1s ease-in-out;
    opacity: 0;
}

.slideshow-img.active {
    display: block;
    opacity: 1;
}

.thumbnail-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.thumbnail {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border: 2px solid var(--neon-green);
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--box-shadow-color);
}

@media (max-width: 768px) {
    .discover-gallery-screen {
        padding: 15px;
    }
    .slideshow-img {
        height: 250px;
    }
    .thumbnail {
        width: 100px;
        height: 75px;
    }
    .bgm-player audio {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .slideshow-img {
        height: 180px;
    }
    .thumbnail {
        width: 80px;
        height: 60px;
    }
    .bgm-player label {
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
  #faction-data-table td[data-label="Shop Items"]::before {
      top: 6px;
      left: 6px;
      width: calc(100% - 12px);
      text-align: center;
      font-size: 1.1em;
      border-bottom: 1px solid var(--neon-magenta);
      padding-bottom: 5px;
  }
  #faction-data-table td[data-label="Shop Items"] {
      padding-top: 34px;
  }
}

@media (max-width: 768px) {
  #faction-data-table td {
    text-align: left;
    padding-left: 6px;
    padding-top: 34px;
  }

  #faction-data-table td::before {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(100% - 12px);
    text-align: center;
    border-bottom: 1px solid var(--neon-magenta);
    padding-bottom: 5px;
    white-space: normal;
  }

  #faction-data-table caption {
    display: block;
    caption-side: top;
    text-align: left;
    padding: 10px 12px;
    margin-bottom: 10px;
    line-height: 1.5;
    border: 1px dashed rgba(196, 153, 66, 0.3);
    border-radius: 6px;
    white-space: normal;
  }
}


/* === Active Nav State for Multi-Page Setup === */
.main-nav .menu-btn[data-active="true"] {
  outline: none;
  border-bottom: 2px solid var(--neon-yellow, #c49942);
  text-shadow: 0 0 6px rgba(196, 153, 66, 0.7);
  filter: drop-shadow(0 0 6px rgba(196, 153, 66, 0.45));
}
.main-nav .menu-btn:hover {
  transform: translateY(-1px);
}