/**
 * Mythic+ Weekly Tracker Modal CSS
 * Eternal Illusion - 2025. október 27.
 */

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Character Data Loading */
.character-data-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    color: #ffffff;
    text-align: center;
    background: rgba(42, 42, 42, 0.8);
    border-radius: 12px;
    margin: 20px 0;
}

.character-data-loading .loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(102, 126, 234, 0.2);
    border-left: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

.character-data-loading .loading-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    color: #667eea;
}

.character-data-loading .loading-text p {
    margin: 0;
    font-size: 1rem;
    color: #b0b0b0;
    opacity: 0.8;
}

/* Character Cards Loading State */
.character-card[style*="pointer-events: none"] {
    cursor: not-allowed !important;
    transition: all 0.3s ease;
    position: relative;
}

.character-card[style*="pointer-events: none"]:hover {
    transform: none !important;
    background: rgba(42, 42, 42, 0.8) !important;
    border-color: transparent !important;
}

/* Card Loading Overlay */
.card-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    z-index: 10;
}

.small-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-left: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Disabled Character Cards Animation */
.character-card[style*="grayscale"] {
    transition: all 0.3s ease;
    transform: scale(0.98);
}

/* Modal Alapok */
.mythic-plus-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.mythic-plus-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

/* Header */
.mythic-plus-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.header-title h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
}

.header-title .header-subtitle {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.mythic-plus-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mythic-plus-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Loading State */
.mythic-plus-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #b0b0b0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-left: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 1.1rem;
}

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

/* Error State */
.mythic-plus-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #ff6b6b;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.error-content p {
    margin: 0 0 20px 0;
    color: #b0b0b0;
}

.retry-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Main Content */
.mythic-plus-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    color: #ffffff;
}

/* Character Selection */
.character-selection-section {
    margin-bottom: 30px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.character-selection-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.4rem;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.character-selection-section h3::before {
    content: "👥";
    font-size: 1.2rem;
}

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

.character-card {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 15px;
}

.character-card:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    transform: translateY(-2px);
}

.character-card.selected {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.character-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.character-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-card-info {
    flex: 1;
}

.character-card-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #ffffff;
}

.character-card-meta {
    font-size: 0.9rem;
    color: #b0b0b0;
}

.character-card-class {
    margin-right: 10px;
}

/* Selected Character */
.selected-character-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.selected-character-header {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.character-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.character-avatar {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-details h3 {
    margin: 0 0 10px 0;
    font-size: 1.6rem;
    color: #ffffff;
}

.character-meta {
    display: flex;
    gap: 15px;
    font-size: 1rem;
    color: #b0b0b0;
}

.character-class {
    font-weight: bold;
    color: #667eea;
}

/* Vault Progress */
.vault-progress {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 12px;
    padding: 25px;
    min-width: 320px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.vault-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    pointer-events: none;
}

.vault-header {
    position: relative;
    z-index: 1;
}

.vault-header h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vault-header h4::before {
    content: "🎁";
    font-size: 1.1rem;
}

.vault-counter {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.vault-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.vault-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.8s ease;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.vault-status {
    text-align: center;
    font-size: 0.95rem;
    color: #b0b0b0;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Weekly Runs */
.weekly-runs-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.weekly-runs-section h4 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.weekly-runs-section h4::before {
    content: "🗝️";
    font-size: 1.2rem;
}

.weekly-runs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.weekly-run-card {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
    position: relative;
}

.weekly-run-card:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.run-image {
    width: 100%;
    height: 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.run-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
}

.run-content {
    padding: 15px;
}

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

.run-dungeon {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
}

.run-level {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: bold;
}

/* Upgrade status colors */
.run-level.upgrade-plus-two {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
}

.run-level.upgrade-plus-one {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
}

.run-level.upgrade-depleted {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
}

.run-details {
    font-size: 0.9rem;
    color: #b0b0b0;
}

.run-time, .run-date {
    margin-right: 15px;
}

/* Overall Stats */
.overall-stats-section {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.overall-stats-section h4 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.overall-stats-section h4::before {
    content: "📊";
    font-size: 1.2rem;
}

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

.stat-card {
    background: linear-gradient(145deg, rgba(42, 42, 42, 0.9), rgba(60, 60, 60, 0.8));
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(5px);
}

.stat-card:hover {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.95rem;
    color: #b0b0b0;
    font-weight: 500;
}

/* Footer */
.mythic-plus-footer {
    background: rgba(42, 42, 42, 0.9);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 15px 15px;
}

.footer-info {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.refresh-btn, .close-btn {
    background: rgba(102, 126, 234, 0.8);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover, .close-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: translateY(-2px);
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mythic-plus-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .mythic-plus-header {
        border-radius: 0;
        padding: 15px 20px;
    }
    
    .header-title h2 {
        font-size: 1.5rem;
    }
    
    .selected-character-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .character-list {
        grid-template-columns: 1fr;
    }
    
    .weekly-runs-list {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading animációk */
.vault-progress-fill.animate {
    animation: progressFill 1.5s ease-out;
}

@keyframes progressFill {
    from { 
        width: 0%; 
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
    to { 
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
    }
}

/* Success/Warning színek vault-hoz */
.vault-progress.complete .vault-progress-fill {
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.vault-progress.complete .vault-counter {
    color: #4CAF50;
}

.vault-progress.incomplete .vault-progress-fill {
    background: linear-gradient(90deg, #ff9800 0%, #ffc107 100%);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
}

.vault-progress.incomplete .vault-counter {
    color: #ff9800;
}

.vault-progress.empty .vault-progress-fill {
    background: linear-gradient(90deg, #f44336 0%, #e91e63 100%);
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.5);
}

.vault-progress.empty .vault-counter {
    color: #f44336;
}

/* Pulsing animáció a vault-hoz */
.vault-progress.complete::before {
    animation: completePulse 2s ease-in-out infinite;
}

@keyframes completePulse {
    0%, 100% { 
        background: linear-gradient(45deg, transparent 0%, rgba(76, 175, 80, 0.1) 50%, transparent 100%);
    }
    50% { 
        background: linear-gradient(45deg, transparent 0%, rgba(76, 175, 80, 0.2) 50%, transparent 100%);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 90, 140, 0.95);
    color: white;
    padding: 14px 20px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(30, 90, 140, 0.4);
    cursor: pointer;
    z-index: 1001;
    animation: pulse-scroll-dark 2.5s infinite;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(52, 152, 219, 0.3);
}

.scroll-indicator:hover {
    background: rgba(30, 90, 140, 1);
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 90, 140, 0.6);
    border-color: rgba(52, 152, 219, 0.8);
}

.scroll-indicator .scroll-arrow {
    font-size: 18px;
    animation: arrow-wave 2s infinite;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(30px);
}

@keyframes pulse-scroll-dark {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 6px 20px rgba(30, 90, 140, 0.4);
        background: rgba(30, 90, 140, 0.95);
    }
    50% {
        transform: translateX(-50%) scale(1.08);
        box-shadow: 0 8px 25px rgba(30, 90, 140, 0.7);
        background: rgba(30, 90, 140, 1);
    }
}

@keyframes arrow-wave {
    0% {
        transform: translateY(-8px);
        opacity: 0;
    }
    20% {
        transform: translateY(-4px);
        opacity: 0.5;
    }
    50% {
        transform: translateY(0px);
        opacity: 1;
    }
    80% {
        transform: translateY(4px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(8px);
        opacity: 0;
    }
}