/* Root Variables - Ragnarok iRO Theme Colors */
:root {
    --primary-blue: #2c5aa0;
    --primary-purple: #6b4c9a;
    --secondary-gold: #f4c542;
    --accent-purple: #8b6bb7;
    --dark-blue: #1a3a6b;
    --light-blue: #4a7bc8;
    --bg-dark: #1a1a2e;
    --bg-medium: #16213e;
    --bg-light: #f5f5f5;
    --text-light: #ffffff;
    --text-dark: #333333;
    --border-color: #ddd;
    --shadow: rgba(0, 0, 0, 0.2);
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-light: #1a1a2e;
    --bg-medium: #16213e;
    --text-dark: #e0e0e0;
    --text-light: #ffffff;
    --border-color: #3a3a4e;
    --shadow: rgba(0, 0, 0, 0.5);
}

body.dark-mode {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
    color: var(--light-blue);
}

body.dark-mode .logo h1 {
    color: var(--secondary-gold);
}

body.dark-mode .current-map-display h3 {
    color: var(--secondary-gold);
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 3px;
    transition: background 0.3s ease;
    z-index: 1001;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dark-mode-toggle .toggle-circle {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle .toggle-circle svg {
    width: 16px;
    height: 16px;
    fill: #f4c542;
}

body.dark-mode .dark-mode-toggle {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .dark-mode-toggle .toggle-circle {
    transform: translateX(30px);
    background: #2c5aa0;
}

body.dark-mode .dark-mode-toggle .toggle-circle svg {
    fill: #ffffff;
}

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

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    color: var(--primary-blue);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    color: var(--text-light);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.discord-icon {
    color: var(--secondary-gold);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.discord-icon:hover {
    color: #ffffff;
    transform: rotate(15deg);
    animation: tilt 0.5s ease-in-out;
}

@keyframes tilt {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-gold);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-gold);
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-purple) 100%);
    background-image: url('images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 58, 107, 0.7) 0%, rgba(107, 76, 154, 0.5) 100%);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-light);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    text-shadow: 3px 3px 8px rgba(0,0,0,0.8), 0 0 20px rgba(42, 90, 160, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-gold);
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-gold), #e6b532);
    color: var(--text-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 197, 66, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary-blue);
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

/* Sections */
.rates-section,
.monster-types-section,
.features-section,
.download-section,
.register-section {
    padding: 4rem 0;
}

.monster-types-section {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-blue);
}

/* Rates Grid */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.rate-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s;
    border-top: 4px solid var(--primary-blue);
}

.rate-card:hover {
    transform: translateY(-5px);
}

.rate-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.rate-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-purple);
}

.rate-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-gold);
    margin: 1rem 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: var(--text-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

.feature-card h3 {
    color: var(--secondary-gold);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Download Section */
.download-section {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

.download-content {
    max-width: 900px;
    margin: 0 auto;
}

.download-steps {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.download-button-container {
    text-align: center;
    margin-top: 3rem;
}

.download-card {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: var(--text-light);
    padding: 3rem 4rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    max-width: 500px;
    text-align: center;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.download-card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.download-card h3 {
    color: var(--secondary-gold);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.download-card-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.download-card-size {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.download-card-button {
    background: var(--secondary-gold);
    color: var(--dark-blue);
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    transition: background 0.3s;
}

.download-card:hover .download-card-button {
    background: #ffdb6b;
}

/* Register Section */
.register-section {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: var(--text-light);
}

.register-section .section-title {
    color: var(--text-light);
}

.register-box {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.register-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Database Page */
.database-container {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-blue);
}

/* Tabs */
.database-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-btn:hover {
    color: var(--primary-blue);
}

.tab-btn.active {
    color: var(--primary-blue);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Search Section */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow);
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.filter-group select {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.95rem;
}

/* Monster Filters Container - 3 Column Layout */
.monster-filters-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.filter-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-column-selects {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 220px;
}

.filter-column-range {
    flex: 1;
    min-width: 280px;
}

.filter-column-types {
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 200px;
}

.filter-column-player-level {
    flex: 0 0 auto;
    min-width: 180px;
    max-width: 200px;
}

.level-range-filter {
    width: 100%;
}

.level-range-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.range-label {
    min-width: 35px;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.level-range-input {
    flex: 1;
    cursor: pointer;
}

.range-value {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

.monster-type-filter {
    width: 100%;
}

.monster-type-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 400;
    color: var(--text-dark);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
    flex-shrink: 0;
}

.checkbox-label span {
    user-select: none;
}

/* Player Level Filter */
.player-level-filter {
}

/* Map Filters */
.map-filters-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.map-type-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Help Icon */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 0.3rem;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: help;
    vertical-align: middle;
    position: relative;
}

.help-icon:hover {
    background-color: #1e5a9e;
}

.help-overlay {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a2e;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: normal;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.help-overlay::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a2e;
}

.help-icon:hover .help-overlay {
    opacity: 1;
    visibility: visible;
}

.player-level-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.player-level-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(42, 90, 160, 0.1);
}

.player-level-input::placeholder {
    color: rgba(51, 51, 51, 0.5);
}

/* Experience Color Coding */
.exp-bonus {
    color: #22c55e;
    font-weight: 600;
}

.exp-penalty {
    color: #ef4444;
    font-weight: 600;
}

/* Filter Loading */
.filter-loading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 0.5rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(42, 90, 160, 0.2);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 992px) {
    .monster-filters-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .filter-column-selects,
    .filter-column-range,
    .filter-column-types {
        max-width: 100%;
        min-width: 100%;
    }
}

/* Results */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.result-count {
    color: var(--primary-purple);
    font-weight: 600;
}

/* Table */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow);
    overflow-x: auto;
}

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

.data-table thead {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: var(--text-light);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: rgba(42, 90, 160, 0.05);
}

.data-table td {
    padding: 1rem;
    vertical-align: middle;
}

.monster-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.monster-sprite-small {
    max-width: 40px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: scale-down;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    flex-shrink: 0;
}

.item-sprite-small {
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.item-icon {
    text-align: center;
}

/* Flexible table columns */
.col-id {
    width: 60px;
    min-width: 60px;
}

.col-icon {
    width: 60px;
    min-width: 60px;
    text-align: center;
}

.col-name {
    flex: 1;
    min-width: 150px;
}

.col-type {
    width: 100px;
    min-width: 100px;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--primary-purple);
    font-size: 1.1rem;
}

/* Maps Grid */
.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.map-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 3px 15px var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.map-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.map-preview {
    width: 100%;
    height: 150px;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.map-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    padding-right: 6rem;
}

.map-id {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
}

.map-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-type-badge.city {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.map-type-badge.dungeon {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
}

.map-type-badge.field {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.map-type-badge.pvp {
    background: linear-gradient(135deg, #F44336, #D32F2F);
    color: white;
}

.map-type-badge.gvg {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.map-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.recommended-level {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Map Explorer Modal */
.modal-large {
    max-width: 900px;
}

.map-explorer-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.map-explorer-header h2 {
    color: var(--primary-blue);
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

.map-explorer-subtitle {
    color: #666;
    font-size: 1rem;
}

.map-explorer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.map-and-spawns-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.current-map-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    border-radius: 15px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.current-map-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--secondary-gold);
}

.current-map-display h3 {
    color: var(--secondary-gold);
    font-size: 1.4rem;
    margin: 0.5rem 0 0 0;
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

.warp-destinations h3 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.warps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.warp-card {
    background: white;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    box-shadow: 0 3px 10px var(--shadow);
}

.warp-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.warp-map-preview {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.warp-map-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.warp-card:hover .warp-map-preview img {
    transform: scale(1.1);
}

.warp-card-info {
    padding: 1rem;
    text-align: center;
}

.warp-card h4 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.warp-dest-id {
    color: #999;
    font-size: 0.8rem;
    font-family: 'Lato', sans-serif;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.warp-direction {
    color: var(--primary-purple);
    font-size: 0.85rem;
    font-weight: 600;
}

.no-warps {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-style: italic;
}

/* Monster Spawns */
.spawns-section {
    margin-top: 2rem;
    width: 100%;
}

.spawns-section h3 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.spawns-list {
    display: grid;
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 1fr);
    gap: 0.75rem;
}

.spawn-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.spawn-item:hover {
    transform: translateX(5px);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px var(--shadow);
}

.spawn-sprite {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.spawn-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spawn-name {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1rem;
}

.spawn-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.spawn-level {
    color: #666;
    font-weight: 500;
}

.spawn-amount {
    color: var(--primary-purple);
    font-weight: 600;
}

.spawn-timer {
    color: #999;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-blue);
    background: white;
    color: var(--primary-blue);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination button:hover {
    background: var(--primary-blue);
    color: white;
}

.pagination button.active {
    background: var(--primary-blue);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 1200px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

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

.close:hover,
.close:focus {
    color: var(--primary-blue);
}

.monster-header,
.item-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.monster-sprite,
.item-sprite {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.monster-sprite {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.monster-title-section h2,
.item-title-section h2 {
    color: var(--primary-blue);
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
}

.detail-columns {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.detail-column-left {
    flex: 1;
    min-width: 0;
}

.detail-column-right {
    flex: 1;
    min-width: 0;
}

@media (max-width: 992px) {
    .detail-columns {
        flex-direction: column;
    }
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

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

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.detail-item {
    padding: 0.25rem 0;
}

.detail-label {
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 0.15rem;
}

.detail-value {
    color: var(--text-dark);
}

.drops-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.drops-table th,
.drops-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.drops-table th {
    background-color: var(--bg-light);
    color: var(--primary-blue);
    font-weight: 600;
}

/* Registration Instructions */
.instructions-section {
    margin-bottom: 2rem;
}

.instructions-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.instruction-list {
    list-style: none;
    counter-reset: instruction-counter;
    padding-left: 0;
}

.instruction-list li {
    counter-increment: instruction-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.instruction-list li::before {
    content: counter(instruction-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.instruction-list li strong {
    display: block;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.instruction-example {
    background-color: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-top: 0.5rem;
    font-family: monospace;
}

.instruction-example code {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 1.1rem;
}

.instruction-note {
    color: var(--primary-purple);
    font-style: italic;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-medium));
    color: var(--text-light);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .rates-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .database-tabs {
        flex-wrap: wrap;
    }

    .search-box {
        flex-direction: column;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

.spawn-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #f7f8fb;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.spawn-map-link:hover {
    color: var(--primary-purple);
    border-color: var(--primary-purple);
    background: #eef1ff;
}

/* Dark Mode Styles */
body.dark-mode .rate-card,
body.dark-mode .step,
body.dark-mode .modal-content,
body.dark-mode .database-card,
body.dark-mode .monster-card,
body.dark-mode .item-card {
    background: var(--bg-medium);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-mode .monster-types-section,
body.dark-mode .download-section {
    background: linear-gradient(135deg, #0f0f1e, #1a1a2e);
}

body.dark-mode .data-table {
    background: var(--bg-medium);
    color: var(--text-dark);
}

body.dark-mode .data-table th {
    background: var(--dark-blue);
    color: var(--text-light);
}

body.dark-mode .data-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

body.dark-mode .data-table tr:hover {
    background: rgba(74, 123, 200, 0.1);
}

body.dark-mode .search-box input,
body.dark-mode .search-box select {
    background: var(--bg-medium);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-mode .search-box input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

body.dark-mode .tab-btn {
    background: var(--bg-medium);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-mode .tab-btn.active {
    background: var(--primary-blue);
    color: var(--text-light);
}

body.dark-mode .modal-content {
    background: var(--bg-medium);
}

body.dark-mode .modal-content h2 {
    color: var(--light-blue);
}

body.dark-mode .modal-content input {
    background: var(--bg-dark);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-mode .spawn-map-link {
    background: var(--bg-dark);
    color: var(--light-blue);
    border-color: var(--border-color);
}

body.dark-mode .spawn-map-link:hover {
    background: rgba(74, 123, 200, 0.2);
    border-color: var(--light-blue);
}

body.dark-mode .database-container {
    background: var(--bg-light);
}

body.dark-mode .page-title {
    color: var(--light-blue);
}

body.dark-mode .search-section {
    background: var(--bg-medium);
    color: var(--text-dark);
}

body.dark-mode .search-input {
    background: var(--bg-dark);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-mode .search-input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

body.dark-mode .filter-group label {
    color: var(--light-blue);
}

body.dark-mode .filter-group select {
    background: var(--bg-dark);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-mode .map-card {
    background: linear-gradient(135deg, var(--bg-medium), #1f1f35);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-mode .map-card h3 {
    color: var(--light-blue);
}

body.dark-mode .map-id {
    color: rgba(224, 224, 224, 0.6);
}

body.dark-mode .map-preview {
    background-color: var(--bg-dark);
}

body.dark-mode .map-card:hover {
    border-color: var(--light-blue);
}

body.dark-mode .pagination button {
    background: var(--bg-medium);
    color: var(--light-blue);
    border-color: var(--light-blue);
}

body.dark-mode .pagination button:hover,
body.dark-mode .pagination button.active {
    background: var(--primary-blue);
    color: var(--text-light);
}

body.dark-mode .table-container {
    background: var(--bg-medium);
}

body.dark-mode .result-count {
    color: var(--light-blue);
}

body.dark-mode .filter-loading,
body.dark-mode .loading {
    color: var(--light-blue);
}

body.dark-mode .spinner {
    border-color: rgba(74, 123, 200, 0.2);
    border-top-color: var(--light-blue);
}

body.dark-mode .checkbox-label {
    color: var(--text-dark);
}

body.dark-mode .player-level-input {
    background-color: var(--bg-dark);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-mode .player-level-input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

body.dark-mode .spawn-name {
    color: var(--light-blue);
}

body.dark-mode .spawn-level,
body.dark-mode .spawn-timer {
    color: rgba(224, 224, 224, 0.6);
}

body.dark-mode .map-explorer-subtitle,
body.dark-mode .warp-dest-id,
body.dark-mode .no-warps {
    color: rgba(224, 224, 224, 0.6);
}

body.dark-mode .warp-card {
    background: var(--bg-medium);
    border-color: var(--border-color);
}

body.dark-mode .warp-card:hover {
    border-color: var(--light-blue);
}

body.dark-mode .warp-map-preview {
    background: linear-gradient(135deg, var(--bg-dark), #0f0f1e);
}

body.dark-mode .warp-card h4,
body.dark-mode .warp-destinations h3,
body.dark-mode .spawns-section h3 {
    color: var(--light-blue);
}

body.dark-mode .spawn-item {
    background: var(--bg-medium);
    border-color: var(--border-color);
}

body.dark-mode .spawn-item:hover {
    border-color: var(--light-blue);
}

/* ===== Card Tab Styles ===== */

.card-slot-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.card-slot-weapon   { background: #c0392b22; color: #c0392b; border: 1px solid #c0392b66; }
.card-slot-shield   { background: #2980b922; color: #2980b9; border: 1px solid #2980b966; }
.card-slot-armor    { background: #27ae6022; color: #27ae60; border: 1px solid #27ae6066; }
.card-slot-headgear { background: #8e44ad22; color: #8e44ad; border: 1px solid #8e44ad66; }
.card-slot-footgear { background: #e67e2222; color: #d35400; border: 1px solid #e67e2266; }
.card-slot-garment  { background: #16a08522; color: #16a085; border: 1px solid #16a08566; }
.card-slot-accessory{ background: #f39c1222; color: #b7950b; border: 1px solid #f39c1266; }
.card-slot-unknown  { background: #7f8c8d22; color: #7f8c8d; border: 1px solid #7f8c8d66; }

body.dark-mode .card-slot-weapon    { color: #e74c3c; border-color: #e74c3c66; background: #e74c3c15; }
body.dark-mode .card-slot-shield    { color: #5dade2; border-color: #5dade266; background: #5dade215; }
body.dark-mode .card-slot-armor     { color: #58d68d; border-color: #58d68d66; background: #58d68d15; }
body.dark-mode .card-slot-headgear  { color: #c39bd3; border-color: #c39bd366; background: #c39bd315; }
body.dark-mode .card-slot-footgear  { color: #f0b27a; border-color: #f0b27a66; background: #f0b27a15; }
body.dark-mode .card-slot-garment   { color: #76d7c4; border-color: #76d7c466; background: #76d7c415; }
body.dark-mode .card-slot-accessory { color: #f9e79f; border-color: #f9e79f66; background: #f9e79f15; }

.card-effect-summary {
    color: #555;
    font-size: 0.88rem;
    max-width: 340px;
}

body.dark-mode .card-effect-summary {
    color: rgba(224, 224, 224, 0.7);
}

/* Card detail modal */
.card-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.card-illustrations {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.card-illustration {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #f8f8f8;
    padding: 4px;
}

body.dark-mode .card-illustration {
    background: var(--bg-dark);
    border-color: var(--border-color);
}

.card-sprite-large {
    max-width: 48px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
}

.card-title-section h2 {
    color: var(--primary-blue);
    margin: 0 0 0.75rem 0;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
}

body.dark-mode .card-title-section h2 {
    color: var(--light-blue);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-id {
    font-size: 0.82rem;
    color: #888;
}

body.dark-mode .card-id {
    color: rgba(224, 224, 224, 0.5);
}

.card-effect-section .card-effect-text {
    line-height: 1.9;
    font-size: 0.95rem;
    color: #333;
}

body.dark-mode .card-effect-section .card-effect-text {
    color: var(--text-dark);
}

/* ===== Quest Tab Styles ===== */

.quest-location-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.quest-loc-top { background: #8e44ad22; color: #8e44ad; border: 1px solid #8e44ad66; }
.quest-loc-mid { background: #2980b922; color: #2980b9; border: 1px solid #2980b966; }
.quest-loc-low { background: #27ae6022; color: #27ae60; border: 1px solid #27ae6066; }

body.dark-mode .quest-loc-top { color: #c39bd3; border-color: #c39bd366; background: #c39bd315; }
body.dark-mode .quest-loc-mid { color: #5dade2; border-color: #5dade266; background: #5dade215; }
body.dark-mode .quest-loc-low { color: #58d68d; border-color: #58d68d66; background: #58d68d15; }

.quest-effect-cell {
    color: #555;
    font-size: 0.88rem;
    line-height: 1.75;
    max-width: 370px;
}

body.dark-mode .quest-effect-cell {
    color: rgba(224, 224, 224, 0.7);
}

/* Quest detail modal */
.quest-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.quest-illustrations {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.quest-illustration {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #f8f8f8;
    padding: 4px;
}

body.dark-mode .quest-illustration {
    background: var(--bg-dark);
    border-color: var(--border-color);
}

.quest-sprite-large {
    max-width: 48px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
}

.quest-title-section h2 {
    color: var(--primary-blue);
    margin: 0 0 0.75rem 0;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
}

body.dark-mode .quest-title-section h2 {
    color: var(--light-blue);
}

.quest-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.quest-id {
    font-size: 0.82rem;
    color: #888;
}

body.dark-mode .quest-id {
    color: rgba(224, 224, 224, 0.5);
}

.quest-item-effect {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.7;
    margin-top: 0.5rem;
}

body.dark-mode .quest-item-effect {
    color: rgba(224, 224, 224, 0.8);
}

.quest-requirements-table {
    width: 100%;
    border-collapse: collapse;
}

.quest-requirements-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.quest-requirements-table tbody tr:hover {
    background: rgba(0,0,0,0.03);
}

body.dark-mode .quest-requirements-table tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

.quest-requirements-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

.req-icon-cell {
    width: 36px;
    text-align: center;
}

.req-qty {
    width: 52px;
    font-weight: 600;
    color: var(--primary-blue);
    text-align: right;
    padding-right: 16px !important;
}

body.dark-mode .req-qty {
    color: var(--light-blue);
}
