/* GW2 API Tool - Styles */

:root {
    --primary-color: #d4af37;
    --secondary-color: #8b7355;
    --dark-bg: #1a1a1a;
    --card-bg: #2a2a2a;
    --border-color: #3a3a3a;
    --text-color: #e0e0e0;
    --text-dim: #a0a0a0;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(42, 42, 42, 0.95) 100%);
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b 0%, #d4af37 50%, #6b6bff 100%);
    opacity: 0.6;
}

.header h1 {
    color: var(--primary-color);
    font-size: 2em;
}

.account-badge {
    background: var(--border-color);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9em;
}

.tier-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(212, 175, 55, 0.8) 100%);
    color: #1a1a1a;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    display: none;
}

/* Trading Post Tabs */
.tp-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tp-tab {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.tp-tab:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
}

.tp-tab.active {
    background: var(--primary-color);
    color: #1a1a1a;
    border-color: var(--primary-color);
}

.tp-view {
    display: none;
}

.tp-view.active {
    display: block;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:hover {
    background: var(--border-color);
}

.search-result-item img {
    width: 32px;
    height: 32px;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Navigation */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-tab {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    background: var(--border-color);
    border-color: var(--primary-color);
}

.nav-tab.active {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
    font-weight: bold;
}

/* Content */
.content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    min-height: 500px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Dashboard Enhancements */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--dark-bg) 0%, rgba(42, 42, 42, 0.8) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(212, 175, 55, 0.3), 0 0 20px rgba(212, 175, 55, 0.1);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5em;
    opacity: 0.9;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.85em;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 5px;
}

/* Quick Actions Panel */
.quick-actions-panel {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
}

.quick-actions-panel h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.action-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.action-primary:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.action-success:hover {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.action-info:hover {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
}

.action-warning:hover {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.1);
}

.action-icon {
    font-size: 2.5em;
}

.action-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.action-text strong {
    color: var(--text-color);
    font-size: 1.1em;
}

.action-text small {
    color: var(--text-dim);
    font-size: 0.85em;
}

/* Activity Timeline */
.activity-timeline {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
}

.activity-timeline h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.timeline-feed {
    max-height: 300px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -6px;
    top: 18px;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.timeline-time {
    font-size: 0.8em;
    color: var(--text-dim);
}

.timeline-text {
    color: var(--text-color);
}

.timeline-guild {
    color: var(--primary-color);
    font-weight: bold;
}

/* Team Activity Overview */
.team-overview {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
}

.team-overview h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.team-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.team-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.95em;
}

.team-bar-bg {
    background: rgba(0, 0, 0, 0.3);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.team-bar-fill {
    height: 100%;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-weight: bold;
    font-size: 0.85em;
}

.team-red {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.6) 0%, rgba(255, 107, 107, 0.9) 100%);
    color: #fff;
}

.team-green {
    background: linear-gradient(90deg, rgba(107, 255, 107, 0.6) 0%, rgba(107, 255, 107, 0.9) 100%);
    color: #fff;
}

.team-blue {
    background: linear-gradient(90deg, rgba(107, 107, 255, 0.6) 0%, rgba(107, 107, 255, 0.9) 100%);
    color: #fff;
}

/* Team Guilds Dropdown */
.team-guilds-dropdown {
    margin-top: 10px;
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

.team-guilds-dropdown .guilds-table {
    font-size: 0.85em;
}

.team-guilds-dropdown .guilds-table th,
.team-guilds-dropdown .guilds-table td {
    padding: 8px;
}

/* Activity Timeline Section */
.activity-timeline-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, rgba(26, 26, 26, 0.95) 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(212, 175, 55, 0.1);
}

.activity-timeline-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.activity-chart-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 250px;
    position: relative;
}

#activity-chart {
    width: 100%;
    height: 250px;
    display: block;
    cursor: crosshair;
}

#activity-tooltip {
    position: absolute !important;
}

.activity-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.activity-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-color);
}

.activity-legend .legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* WvW Match Overview */
.wvw-match-overview {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
}

.wvw-match-overview h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.match-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.match-team-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.match-team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.match-team-card.team-red {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.match-team-card.team-green {
    border-color: #6bff6b;
    background: rgba(107, 255, 107, 0.05);
}

.match-team-card.team-blue {
    border-color: #6b6bff;
    background: rgba(107, 107, 255, 0.05);
}

.match-team-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.match-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.9em;
}

.match-stat-label {
    color: var(--text-dim);
}

.match-stat-value {
    font-weight: bold;
    color: var(--text-color);
}

.match-countdown {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.95em;
}

/* WvW Interactive Maps */
.wvw-maps-section {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
}

.map-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.map-selector {
    display: flex;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}

.map-tab {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.map-tab:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.map-tab.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.map-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    min-height: 600px;
}

.map-canvas {
    background: #0a0a0a;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 10px;
    overflow: auto;
}

.wvw-map-svg {
    width: 100%;
    height: auto;
    display: block;
}

.objective-marker:hover circle {
    stroke-width: 4;
    filter: brightness(1.3);
}

.objective-details-panel {
    background: var(--card-bg);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
}

.objective-details-card {
    animation: fadeIn 0.3s ease;
}

.objective-details-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.objective-details-card p {
    margin: 8px 0;
    font-size: 0.95em;
}

.map-legend {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.map-legend h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legend-icon {
    font-size: 1.3em;
}

.map-scores {
    display: flex;
    justify-content: space-around;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-weight: bold;
}

@media (max-width: 1200px) {
    .map-container {
        grid-template-columns: 1fr;
    }
    
    .objective-details-panel {
        min-height: 200px;
    }
}

/* Content */
.content h2 {
    margin-bottom: 20px;
}

.tab-content {
    display: none;
}

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

.tab-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Buttons */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.btn-primary:hover {
    background: #c19b2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #765f47;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Time Window Selector */
.time-window-selector {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 6px;
}

.time-window-btn {
    padding: 6px 14px;
    border: 1px solid #444;
    border-radius: 4px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.time-window-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.time-window-btn.active {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
    font-weight: 600;
}

/* Enhanced WvW Stats */
.stat-panel {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(42, 42, 42, 0.95) 100%);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.05);
    border: 2px solid var(--border-color);
    position: relative;
}

.stat-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.6;
    border-radius: 8px 8px 0 0;
}

.stat-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1em;
}

.ppt-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ppt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.ppt-label {
    font-size: 0.95em;
    opacity: 0.9;
}

.ppt-value {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--primary-color);
}

.territory-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.territory-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.territory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.territory-team {
    font-weight: 600;
    font-size: 1em;
}

.territory-percent {
    font-weight: bold;
    color: var(--primary-color);
}

.territory-bar {
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #444;
}

.territory-fill {
    height: 100%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.territory-details {
    font-size: 0.85em;
    opacity: 0.7;
    text-align: right;
}

/* Forms */
.query-form {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.query-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 500;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-text {
    flex: 1;
    padding: 12px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1em;
}

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

.input-textarea {
    width: 100%;
    padding: 12px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1em;
    font-family: 'Courier New', monospace;
    min-height: 100px;
    margin-bottom: 15px;
}

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

.preset-items, .preset-queries {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.preset-items p, .preset-queries p {
    color: var(--text-dim);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.preset-items button, .preset-queries button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Results */
.result-container {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.result-container:empty {
    display: none;
}

.result-container pre {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th {
    background: var(--primary-color);
    color: var(--dark-bg);
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background: var(--border-color);
}

/* Character Select */
#character-select {
    margin: 20px 0;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.character-card {
    background: var(--dark-bg);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.character-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.character-card h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

/* Info Boxes */
.info-box {
    background: var(--dark-bg);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--info-color);
    margin-top: 20px;
}

.info-box p {
    color: var(--text-dim);
    margin-bottom: 10px;
}

.info-box ol {
    margin-left: 20px;
    color: var(--text-dim);
}

.info-box a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-box a:hover {
    text-decoration: underline;
}

/* Settings */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Status Messages */
.status-message {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.status-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.status-error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.status-warning {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
}

.status-info {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid var(--info-color);
    color: var(--info-color);
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .nav-tab {
        width: 100%;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* WvW Specific Styles */
.wvw-match-card {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.wvw-match-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.wvw-teams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.wvw-team {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.wvw-team-red {
    border-left: 4px solid #ff6b6b;
}

.wvw-team-green {
    border-left: 4px solid #6bff6b;
}

.wvw-team-blue {
    border-left: 4px solid #6b6bff;
}

.wvw-my-team {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    border: 2px solid var(--primary-color);
}

.wvw-team h5 {
    margin-bottom: 10px;
}

.wvw-team p {
    margin: 8px 0;
    font-size: 0.95em;
}

.wvw-team ul {
    margin: 5px 0 10px 20px;
    font-size: 0.9em;
}

.wvw-team li {
    margin: 3px 0;
    color: var(--text-dim);
}

.wvw-maps {
    margin-top: 20px;
}

.wvw-maps h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.wvw-map-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.wvw-map-card h6 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.wvw-map-scores {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.score-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
}

.score-red {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
}

.score-green {
    background: rgba(107, 255, 107, 0.2);
    border: 1px solid #6bff6b;
    color: #6bff6b;
}

.score-blue {
    background: rgba(107, 107, 255, 0.2);
    border: 1px solid #6b6bff;
    color: #6b6bff;
}

.wvw-skirmish-info {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--info-color);
    margin-top: 15px;
}

.wvw-skirmish-info h5 {
    color: var(--info-color);
    margin-bottom: 10px;
}

/* Guild Claims */
.guild-claims {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.guild-claims p {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.guild-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guild-list li {
    padding: 5px 10px;
    margin: 3px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    border-left: 3px solid currentColor;
    font-size: 0.9em;
}

.wvw-controls {
    margin-bottom: 20px;
}

/* Tracked Guilds */
.tracked-guilds-container {
    padding: 20px;
}

.tracked-header {
    background: var(--dark-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.tracked-header h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.team-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.team-tab {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.team-tab:hover {
    background: var(--border-color);
}

.team-tab.active {
    background: var(--primary-color);
    color: var(--dark-bg);
    border-color: var(--primary-color);
    font-weight: bold;
}

.team-guilds-list {
    animation: fadeIn 0.3s ease;
}

.team-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.guild-stats {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
}

.guilds-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: var(--dark-bg);
    border-radius: 6px;
    overflow: hidden;
}

.guilds-table thead {
    background: rgba(212, 175, 55, 0.2);
}

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

.guilds-table th {
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.guilds-table tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

.guilds-table .text-center {
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   WAR ROOM STYLES
   ============================================================================ */

.warroom-maps-section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.warroom-maps-section h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.warroom-map-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-auto-rows: minmax(0, 1fr);
    gap: 20px;
    margin-top: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .warroom-map-container {
        grid-template-columns: 1fr;
    }
}

.warroom-events-panel {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.warroom-events-panel h4 {
    color: var(--primary-color);
    font-size: 1.1em;
}

.warroom-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 0.9em;
    max-width: 300px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.warroom-tooltip h5 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.warroom-tooltip p {
    margin: 4px 0;
}

.capture-events-feed {
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
}

.capture-events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.capture-event-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.9em;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.event-time {
    color: #d4af37;
    font-weight: bold;
    font-size: 0.95em;
}

.event-team {
    font-size: 0.9em;
}

.event-objective {
    margin: 4px 0;
    font-size: 0.95em;
}

.event-map {
    color: #888;
    font-size: 0.85em;
}

.capture-events-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dark-bg);
    border-radius: 6px;
    overflow: hidden;
}

.capture-events-table thead {
    background: rgba(212, 175, 55, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.capture-events-table th {
    padding: 12px;
    text-align: left;
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
    border-bottom: 2px solid var(--border-color);
}

.capture-events-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95em;
}

.capture-events-table tr:hover {
    background: rgba(212, 175, 55, 0.08);
}

.capture-events-table tr:last-child td {
    border-bottom: none;
}

/* Scrollbar styling for events feed */
.capture-events-feed::-webkit-scrollbar {
    width: 10px;
}

.capture-events-feed::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.capture-events-feed::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.capture-events-feed::-webkit-scrollbar-thumb:hover {
    background: #c9982e;
}

.events-legend {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-size: 0.9em;
    color: #a0a0a0;
}

/* ============================================================================
   TRADING POST ECONOMIC ANALYSIS
   ============================================================================ */

.tp-economic-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    margin-top: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.tp-economic-section h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.economic-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

@media (max-width: 900px) {
    .economic-header {
        grid-template-columns: 1fr;
    }
}

.economic-item-info {
    display: flex;
    align-items: center;
}

.economic-recommendation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.recommendation-badge {
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    min-width: 200px;
}

.recommendation-type {
    font-size: 1.4em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.recommendation-reasons {
    font-size: 0.85em;
    opacity: 0.9;
}

.recommendation-reasons div {
    margin: 3px 0;
}

.economic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

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

.economic-card {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.economic-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

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

.economic-table tr {
    border-bottom: 1px solid var(--border-color);
}

.economic-table tr:last-child {
    border-bottom: none;
}

.economic-table td {
    padding: 10px 5px;
}

.economic-table td:first-child {
    color: #aaa;
    font-size: 0.95em;
}

.economic-table td:last-child {
    text-align: right;
    font-weight: bold;
    font-size: 1.05em;
}

.economic-chart-section {
    background: var(--dark-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.economic-chart-section h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

#order-book-chart {
    width: 100%;
    max-width: 100%;
    display: block;
}

/* Inventory & Bank Styles */
.inventory-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    color: #fff;
    font-size: 0.9em;
    max-width: 400px;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.inventory-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-bottom: 8px;
    align-items: center;
    transition: all 0.2s;
}

.inventory-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.inventory-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.inventory-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inventory-item-name {
    font-weight: bold;
    font-size: 1.05em;
}

.inventory-item-quantity {
    opacity: 0.7;
    font-size: 0.9em;
}

.inventory-item-prices {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9em;
}

.inventory-item-recommendation {
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
    white-space: nowrap;
}

.recommendation-sell {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.recommendation-buy {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid #3498db;
    color: #3498db;
}

.recommendation-hold {
    background: rgba(241, 196, 15, 0.2);
    border: 1px solid #f1c40f;
    color: #f1c40f;
}

.inventory-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.inventory-section-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
}

.inventory-total-value {
    font-size: 1.1em;
    color: #f1c40f;
}

.trend-chart-mini {
    width: 100%;
    height: 60px;
    margin-top: 10px;
}


/* Authentication Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 500px;
}

.auth-container {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(42, 42, 42, 0.95) 100%);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 40px rgba(212, 175, 55, 0.2);
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    color: var(--primary-color);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-color);
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-dim);
    font-size: 0.85em;
}

.btn-block {
    width: 100%;
    padding: 12px;
    margin: 20px 0;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-size: inherit;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #e0c970;
}

.error-message {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--error-color);
    color: #ff6b6b;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Hide main container until logged in */
.container.hidden {
    display: none;
}

/* Responsive Auth Form */
@media (max-width: 600px) {
    .auth-container {
        padding: 30px 20px;
    }

    .auth-container h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .auth-form h2 {
        font-size: 1.2em;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
