/* Diablo Fonts */
@font-face {
    font-family: 'Diablo Heavy';
    src: url('/fonts/Diablo Heavy.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Diablo Light';
    src: url('/fonts/Diablo Light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--primary-bg-color, black);
    color: var(--primary-text-color, white);
    min-height: 100vh;
    padding: 20px;
}

/* Style the Jubaroo Hub header with Diablo font and gold line */
header h1 {
    font-family: 'Diablo Heavy', Arial, sans-serif !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    position: relative !important;
    padding-bottom: 15px !important;
}

header h1::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 150px !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #d4af37, transparent) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6) !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

h1, .page-title {
    color: var(--primary-text-color, white);
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-family: 'Diablo Heavy', Arial, sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 20px;
}

h1::after, .page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.description {
    text-align: center;
    color: var(--secondary-text-color, #999);
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Info Banner */
.info-banner {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid var(--input-border-color, darkred);
    border-radius: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.info-label {
    color: var(--secondary-text-color, #999);
    font-size: 0.9em;
    text-transform: uppercase;
}

.info-value {
    color: var(--header-bg-color, darkred);
    font-weight: bold;
    font-size: 1.1em;
}

/* Helltides Grid */
.helltides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.helltide-card {
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid var(--input-border-color, darkred);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
    overflow: visible;
}

/* Decorative corners - using box-shadow to create them */
.helltide-card {
    --corner-size: 20px;
    --corner-offset: 8px;
}

.helltide-card::after,
.helltide-card::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #d4af37;
    opacity: 0.5;
    transition: opacity 0.3s;
    pointer-events: none;
}

.helltide-card::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.helltide-card::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

.helltide-card:hover::before,
.helltide-card:hover::after {
    opacity: 1;
}

.helltide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--input-shadow, 0 0 15px rgba(255, 0, 0, 0.5));
}

.helltide-card.active {
    background: linear-gradient(135deg, #8b0000 0%, #5a0000 100%);
    border-color: var(--button-hover-bg-color, red);
    box-shadow: var(--input-shadow, 0 0 20px rgba(255, 0, 0, 0.7));
}

.helltide-card.active::before,
.helltide-card.active::after {
    opacity: 1;
    border-color: #ff6b6b;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 2em;
}

.card-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-text-color, white);
    font-family: 'Diablo Light', Arial, sans-serif;
}

.helltide-card.active .card-title {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.status-badge {
    background: var(--button-bg-color, darkred);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

/* Alert Toggle Button */
.alert-toggle {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 6px;
    z-index: 10;
}

.alert-toggle svg {
    width: 26px;
    height: 26px;
    display: block;
}

.alert-toggle:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.6);
    transform: scale(1.1);
}

.alert-toggle:active {
    transform: scale(0.95);
}

.helltide-card.active .status-badge {
    background: #ff0000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.countdown-large {
    text-align: center;
    margin: 20px 0;
}

.time-display {
    font-size: 3em;
    font-weight: 700;
    color: #d4af37;
    font-family: 'Diablo Heavy', 'Segoe UI', 'Roboto', Arial, sans-serif;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.helltide-card.active .time-display {
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.time-label {
    color: var(--secondary-text-color, #999);
    font-size: 0.9em;
    margin-top: 5px;
}

.spawn-time {
    text-align: center;
    color: var(--secondary-text-color, #999);
    font-size: 0.85em;
    margin-top: 10px;
}

/* Zone Info */
.zone-info {
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid var(--input-border-color, darkred);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.zone-info h2 {
    color: var(--primary-text-color, white);
    margin-bottom: 20px;
    text-align: center;
}

.zones-list {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.zone-badge {
    background: var(--input-bg-color, #000);
    border: 2px solid var(--input-border-color, darkred);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
}

.zone-badge:hover {
    border-color: var(--button-hover-bg-color, red);
    transform: scale(1.05);
}

.zone-note {
    text-align: center;
    color: var(--secondary-text-color, #999);
    font-size: 0.9em;
    line-height: 1.6;
}

/* Tips Section */
.tips-section {
    margin-bottom: 30px;
}

.tips-section h2 {
    color: var(--primary-text-color, white);
    text-align: center;
    margin-bottom: 20px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tip-card {
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid var(--input-border-color, darkred);
    border-radius: 10px;
    padding: 20px;
}

.tip-card h3 {
    color: var(--header-bg-color, darkred);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.tip-card p {
    color: var(--secondary-text-color, #999);
    line-height: 1.6;
    font-size: 0.95em;
}

/* Resources */
.resources {
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid var(--input-border-color, darkred);
    border-radius: 12px;
    padding: 25px;
}

.resources h3 {
    color: var(--primary-text-color, white);
    text-align: center;
    margin-bottom: 20px;
}

.resource-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.resource-link {
    background: var(--button-bg-color, darkred);
    color: var(--button-text-color, white);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.resource-link:hover {
    background: var(--button-hover-bg-color, red);
}

/* Light Theme */
[data-theme="light"] h1,
[data-theme="light"] .zone-info h2,
[data-theme="light"] .tips-section h2,
[data-theme="light"] .resources h3 {
    color: var(--primary-text-color) !important;
}

[data-theme="light"] .helltide-card,
[data-theme="light"] .info-banner,
[data-theme="light"] .zone-info,
[data-theme="light"] .tip-card,
[data-theme="light"] .resources {
    background: white;
}

[data-theme="light"] .zone-badge {
    background: #f8f9fa;
}

/* Toggle Button */
.toggle-container {
    text-align: center;
    margin: 30px 0;
}

.toggle-btn {
    background: var(--button-bg-color, darkred);
    color: #d4af37;
    border: 2px solid #d4af37;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.toggle-btn:hover {
    background: var(--button-hover-bg-color, red);
    border-color: #fff;
    color: #fff;
    transform: scale(1.05);
}

.helltide-card.hidden {
    display: none;
}

/* Zone Icon */
.zone-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    border: 2px solid #d4af37;
    flex-shrink: 0;
}

.zone-icon svg {
    width: 24px;
    height: 24px;
    fill: #d4af37;
    flex-shrink: 0;
}

/* Event Sections */
.event-section {
    margin-bottom: 50px;
    padding-bottom: 50px;
    position: relative;
    text-align: center; /* Center align the content */
}

.event-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37 20%, #d4af37 80%, transparent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.event-section:last-of-type::after {
    display: none;
}

/* Fancy divider ornament */
.event-section::before {
    content: '⬥';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    color: #d4af37;
    font-size: 1.5em;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
    background: var(--primary-bg-color, black);
    padding: 0 15px;
    z-index: 1;
}

.event-section h2,
.section-title {
    color: var(--primary-text-color, white);
    font-size: 2em;
    margin-bottom: 20px;
    font-family: 'Diablo Heavy', Arial, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::before {
    content: '⟨';
    position: absolute;
    left: -30px;
    color: #d4af37;
    font-size: 1.2em;
    opacity: 0.7;
}

.section-title::after {
    content: '⟩';
    position: absolute;
    right: -30px;
    color: #d4af37;
    font-size: 1.2em;
    opacity: 0.7;
}

.event-desc {
    color: var(--secondary-text-color, #999);
    margin-bottom: 25px;
    font-size: 1em;
}

.disclaimer {
    display: inline-block;
    color: #ff9500;
    font-weight: bold;
    margin-left: 10px;
}

/* Legion Events Grid */
.legion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.legion-card {
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid #ff9500;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
    overflow: visible;
}

/* Decorative corners for legion cards */
.legion-card::after,
.legion-card::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #ff9500;
    opacity: 0.4;
    transition: opacity 0.3s;
    pointer-events: none;
}

.legion-card::before {
    top: 8px;
    right: 8px;
    border-left: none;
    border-bottom: none;
}

.legion-card::after {
    bottom: 8px;
    left: 8px;
    border-right: none;
    border-top: none;
}

.legion-card:hover::before,
.legion-card:hover::after {
    opacity: 1;
}

.legion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(255, 149, 0, 0.5);
}

/* World Boss Grid */
.world-boss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.world-boss-grid.centered {
    justify-content: center;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.world-boss-card {
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid #8b0000;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
    overflow: visible;
}

/* Decorative corners for world boss cards */
.world-boss-card::after,
.world-boss-card::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #d4af37;
    opacity: 0.4;
    transition: opacity 0.3s;
    pointer-events: none;
}

.world-boss-card::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.world-boss-card::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

.world-boss-card:hover::before,
.world-boss-card:hover::after {
    opacity: 1;
}

.world-boss-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
}

.boss-location {
    color: #d4af37;
    font-size: 0.9em;
    margin-top: 5px;
    font-weight: 500;
}

/* World Boss Info */
.world-boss-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.world-boss-info.centered {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 1fr;
}

.boss-card {
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid #8b0000;
    border-radius: 12px;
    padding: 25px;
}

.boss-card h3 {
    color: var(--primary-text-color, white);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.boss-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.boss-card li {
    color: var(--secondary-text-color, #999);
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.boss-card li:last-child {
    border-bottom: none;
}

.boss-card li strong {
    color: var(--primary-text-color, white);
}

.boss-card p {
    color: var(--secondary-text-color, #999);
    line-height: 1.6;
    margin-bottom: 20px;
}

.tracker-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tracker-link {
    background: var(--button-bg-color, darkred);
    color: var(--button-text-color, white);
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
}

.tracker-link:hover {
    background: var(--button-hover-bg-color, red);
    transform: scale(1.02);
}

/* Elixir Timer */
.elixir-timer-card {
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
}

.elixir-timer-card .card-title {
    font-size: 1.5em;
    color: #00aaff;
    margin-bottom: 10px;
}

.elixir-desc {
    color: var(--secondary-text-color, #999);
    margin-bottom: 20px;
}

#elixir-timer {
    font-size: 3em;
    font-weight: 700;
    color: #00aaff;
    font-family: 'Diablo Heavy', 'Segoe UI', 'Roboto', Arial, sans-serif;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.6);
}

.elixir-btn {
    background: #007bff;
    color: white;
    border: 2px solid #00aaff;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.elixir-btn:hover {
    background: #0056b3;
    border-color: #fff;
    transform: scale(1.05);
}

.elixir-btn:disabled {
    background: #004494;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--input-bg-color, #1a1a1a);
    border: 2px solid var(--input-border-color, darkred);
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: #28a745;
    color: white;
}

.toast-info .toast-icon {
    background: #17a2b8;
    color: white;
}

.toast-error .toast-icon {
    background: #dc3545;
    color: white;
}

.toast-message {
    color: var(--primary-text-color, white);
    font-size: 0.95em;
    line-height: 1.4;
}

.toast-success {
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(40, 167, 69, 0.3);
}

.toast-info {
    border-color: #17a2b8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(23, 162, 184, 0.3);
}

.toast-error {
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(220, 53, 69, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    .info-banner {
        gap: 15px;
    }

    .helltides-grid {
        grid-template-columns: 1fr;
    }

    .time-display {
        font-size: 2.5em;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .legion-grid {
        grid-template-columns: 1fr;
    }

    .world-boss-grid {
        grid-template-columns: 1fr;
    }

    .world-boss-info {
        grid-template-columns: 1fr;
    }

    .event-section h2 {
        font-size: 1.5em;
    }

    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }

    .toast.show {
        transform: translateY(0);
    }
}
