/* layouts/header.css - Enhanced header for Pokemon Pack Opener */

/* === HEADER STRUCTURE === */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.98));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(248, 113, 113, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(248, 113, 113, 0.2);
    z-index: 1000;
    color: var(--color-text-primary, #f3f4f6);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 clamp(0.75rem, 2vw, 1.5rem);
    max-width: 1400px;
    margin: 0 auto;
    gap: clamp(0.5rem, 2vw, 1rem);
}

/* === BRAND AREA === */
.brand-area {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    flex-shrink: 0;
    min-width: 0;
}

.title-glow {
    font-family: 'Pirata One', cursive;
    font-size: clamp(1rem, 3vw, 1.6rem);
    color: #ff2600; 
    text-shadow: 
        0 0 2px #ff8800,
        0 0 4px #ff0000,
        0 0 6px #4a5568;
    animation: flicker 3s infinite alternate;
    white-space: nowrap;
    margin: 0;
    letter-spacing: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 
            0 0 2px #4a5568, 0 0 4px #4a5568, 0 0 6px #4a5568,
            0 0 8px #ff2600, 0 0 10px #ff8800;
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: 
            0 0 1px #2d3748, 0 0 2px #2d3748, 0 0 3px #2d3748,
            0 0 5px #ff2600;
        opacity: 0.7;
    }
}

/* === VERSION BADGE === */
.version-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.8), rgba(239, 68, 68, 0.9));
    color: white;
    padding: clamp(0.2rem, 0.5vw, 0.25rem) clamp(0.4rem, 1vw, 0.5rem);
    border-radius: 9999px;
    border: 1px solid rgba(248, 113, 113, 0.7);
    font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 0 5px rgba(248, 113, 113, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.version-badge:hover,
.version-badge:focus {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.6);
    transform: scale(1.05);
    outline: none;
    border-color: rgba(248, 113, 113, 1);
}

/* === HEADER ACTIONS - SINGLE ROW LAYOUT === */
.header-actions {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1vw, 0.75rem);
    flex-shrink: 0;
    flex-wrap: nowrap;
}

/* === HEADER BUTTONS - COMPACT RESPONSIVE DESIGN === */
.header-button {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(124, 58, 237, 0.9));
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 6px;
    padding: clamp(0.3rem, 1vw, 0.5rem) clamp(0.5rem, 1.5vw, 0.8rem);
    font-size: clamp(0.7rem, 1.8vw, 0.875rem);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 0.8vw, 0.375rem);
    text-decoration: none;
    font-family: inherit;
    height: clamp(28px, 6vw, 36px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 0;
}

.header-button:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: rgba(139, 92, 246, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    color: white;
}

.header-button:active {
    transform: translateY(0);
}

.header-button i {
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.header-button:hover i {
    transform: scale(1.1);
}

/* Hide button text on very small screens, keep only icons */
@media (max-width: 480px) {
    .header-button span {
        display: none;
    }
    
    .header-button {
        padding: clamp(0.4rem, 1.2vw, 0.5rem);
        min-width: clamp(32px, 8vw, 40px);
        justify-content: center;
    }
    
    .title-glow {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }
}

/* === HEADER MESSAGE === */
.header-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1100;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-message-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(21, 128, 61, 0.95));
    border: 1px solid rgba(34, 197, 94, 0.7);
}

.header-message-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.95));
    border: 1px solid rgba(239, 68, 68, 0.7);
}

.header-message-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.95));
    border: 1px solid rgba(59, 130, 246, 0.7);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* === MODAL STYLES === */
.changelog-modal-overlay,
.about-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(5px);
}

.changelog-modal-overlay.visible,
.about-modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.changelog-modal-content,
.about-modal-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.98));
    border-radius: 12px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(248, 113, 113, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--color-text-primary, #f3f4f6);
}

.changelog-modal-header,
.about-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(248, 113, 113, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

.changelog-modal-title,
.about-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f87171;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}

.changelog-modal-close,
.about-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.changelog-modal-close:hover,
.about-modal-close:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    transform: rotate(90deg);
}

.changelog-modal-body,
.about-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

/* === CHANGELOG ACCORDION === */
.changelog-accordion-item {
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.3);
}

.changelog-accordion-header {
    padding: 1rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    transition: all 0.2s ease;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.changelog-accordion-header::-webkit-details-marker {
    display: none;
}

.changelog-accordion-header::after {
    content: '▼';
    font-size: 0.8rem;
    color: #f87171;
    transition: transform 0.2s ease;
}

.changelog-accordion-item[open] > .changelog-accordion-header::after {
    transform: rotate(180deg);
}

.changelog-accordion-header:hover {
    background: rgba(248, 113, 113, 0.1);
}

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

.version-number {
    font-weight: 600;
    color: #f87171;
    font-size: 1rem;
}

.version-title {
    color: #fbbf24;
    font-size: 0.875rem;
    font-weight: 500;
}

.version-date {
    color: #9ca3af;
    font-size: 0.75rem;
}

.changelog-accordion-body {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(71, 85, 105, 0.2);
}

.changelog-item {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 6px;
    border-left: 3px solid #f87171;
    font-size: 0.875rem;
    line-height: 1.5;
}

.changelog-item strong {
    color: #fbbf24;
    font-weight: 600;
}

/* === ABOUT MODAL CONTENT === */
.about-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 8px;
    border-left: 3px solid #f87171;
}

.about-section h4 {
    color: #f87171;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-section h4 i {
    color: #fbbf24;
    font-size: 0.9rem;
}

.about-section p {
    margin: 0;
    line-height: 1.6;
    color: #d1d5db;
}

.about-section ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
    color: #d1d5db;
}

.about-section li {
    margin-bottom: 0.375rem;
    line-height: 1.5;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .app-header {
        height: auto;
        min-height: 60px;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    
    .brand-area {
        flex: 1 1 100%;
        order: 1;
        justify-content: center;
    }
    
    .header-actions {
        order: 2;
        gap: 0.5rem;
        flex: 1 1 100%;
        justify-content: center;
    }
    
    .title-glow {
        font-size: 1.5rem;
    }
    
    .header-button span {
        display: none;
    }
    
    .header-button {
        padding: 0.5rem;
        width: 36px;
        justify-content: center;
    }
    
    .version-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .changelog-modal-content,
    .about-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .header-message {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.5rem;
    }
    
    .header-actions {
        gap: 0.25rem;
    }
    
    .header-button {
        padding: 0.375rem;
        width: 32px;
        height: 32px;
    }
    
    .header-button i {
        font-size: 0.8rem;
    }
}

/* === SPECIFIC BUTTON STYLES === */
.info-button {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.9));
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.info-button:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.github-button {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.8), rgba(55, 65, 81, 0.9));
    border-color: rgba(75, 85, 99, 0.5);
    box-shadow: 0 2px 6px rgba(75, 85, 99, 0.3);
}

.github-button:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    border-color: rgba(75, 85, 99, 0.8);
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.4);
}

.discord-button {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.8), rgba(120, 53, 15, 0.9));
    border-color: rgba(139, 69, 19, 0.5);
    box-shadow: 0 2px 6px rgba(139, 69, 19, 0.3);
}

.discord-button:hover {
    background: linear-gradient(135deg, #8b4513, #78350f);
    border-color: rgba(139, 69, 19, 0.8);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
} 