/* 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);
}

* {
    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;
}

/* 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;
}

.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-card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.map-id {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-family: monospace;
}

.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;
}

.explore-btn {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 0.9rem;
}

/* 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.5rem;
    margin-bottom: 0.5rem;
}

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

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

.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: 2rem;
    margin: 0;
}

.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.1rem;
    margin-bottom: 0.3rem;
}

.warp-dest-id {
    color: #999;
    font-size: 0.8rem;
    font-family: monospace;
    margin-bottom: 0.5rem;
}

.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;
}

/* 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: 800px;
    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);
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

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

.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;
    }
}
