/*
 * layout.css - Layout und Struktur für Rocket100 NFT Battle Mini App
 * Enthält: Background, Header, Navigation, Page Structure
 */

/* --- Animated Background --- */
.app-container {
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-blue-dark) 100%);
    position: relative;
    overflow: hidden;
}

.app-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 110, 225, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
    pointer-events: none;
}

.app-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(6, 110, 225, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 110, 225, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

/* --- App Header --- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-blue);
    box-shadow: var(--shadow-glow) rgba(6, 110, 225, 0.3);
    padding: 0 15px;
}

.app-title {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 
        0 0 8px var(--primary-blue),
        0 0 15px var(--primary-blue),
        0 0 25px var(--primary-blue);
    animation: titleGlow 3s ease-in-out infinite;
}

.header-credits {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--credit-gold);
    border-radius: 25px;
    padding: 8px 15px;
    box-shadow: 
        var(--shadow-glow) var(--credit-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: creditGlow 3s ease-in-out infinite;
}

.credit-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--credit-gold);
    box-shadow: 0 0 10px var(--credit-glow);
    animation: coinSpin 4s linear infinite;
}

.header-credits span {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 900;
    color: var(--credit-gold);
    text-shadow: 0 0 10px var(--credit-glow);
    min-width: 20px;
    text-align: right;
}

/* --- Main Content Layout --- */
.main-content {
    position: absolute;
    top: 55px;
    left: 0;
    right: 0;
    bottom: 65px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

.page {
    display: none;
    padding: 15px;
    min-height: calc(100vh - 120px);
}

.page.active {
    display: block;
    animation: pageSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    border-top: 2px solid var(--primary-blue);
    box-shadow: var(--shadow-glow) rgba(6, 110, 225, 0.3);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Rajdhani', sans-serif;
    font-size: 9px;
    font-weight: 600;
    padding: 6px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 45px;
    position: relative;
}

.nav-btn.active {
    color: var(--accent-cyan);
    background: rgba(0, 255, 255, 0.1);
    box-shadow: var(--shadow-glow) rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn:hover {
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-icon {
    font-size: 16px;
    transition: all 0.3s ease;
}

.nav-btn.active .nav-icon {
    text-shadow: 0 0 12px var(--accent-cyan);
    animation: navIconGlow 2s ease-in-out infinite;
}

/* Am Ende von layout.css hinzufügen - Home Page Overrides */

/* --- Kompakte Home Page Styles --- */
.welcome-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 12px 15px; /* ✅ Weniger Padding: 25px → 12px */
    text-align: center;
    margin-bottom: 15px; /* ✅ Weniger Margin: 20px → 15px */
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(6, 110, 225, 0.05) 0%, transparent 70%);
    animation: rotateGradient 15s linear infinite;
    pointer-events: none;
}

/* ✅ Kompaktere User Info */
.user-name {
    font-family: 'Orbitron', monospace;
    font-size: 16px; /* ✅ Kleiner: 20px → 16px */
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 4px; /* ✅ Weniger: 8px → 4px */
    text-shadow: 0 0 8px var(--accent-cyan);
}

.user-stats {
    font-size: 11px; /* ✅ Kleiner: 14px → 11px */
    color: var(--text-secondary);
    margin-bottom: 8px; /* ✅ Weniger: 15px → 8px */
    opacity: 0.8;
}

/* ✅ Kompakte Credits */
.user-credits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* ✅ Weniger: 15px → 8px */
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 8px 12px; /* ✅ Weniger: 20px → 8px 12px */
    margin: 8px 0; /* ✅ Weniger: 20px → 8px */
    position: relative;
    overflow: hidden;
}

.credit-icon-large {
    width: 28px; /* ✅ Kleiner */
    height: 28px; /* ✅ Kleiner */
}

.credit-amount {
    font-family: 'Orbitron', monospace;
    font-size: 18px; /* ✅ Kleiner: 24px → 18px */
    font-weight: 900;
    color: var(--credit-gold);
    text-shadow: 0 0 8px var(--credit-gold);
}

.credit-label {
    font-size: 10px; /* ✅ Kleiner */
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ✅ Kompakter Wallet Status */
.wallet-status {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 12px; /* ✅ Weniger: 20px → 8px 12px */
    margin-bottom: 10px; /* ✅ Weniger: 20px → 10px */
    text-align: center;
    transition: all 0.3s ease;
}

#wallet-text {
    font-size: 11px; /* ✅ Kleiner */
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.wallet-address {
    font-family: 'Orbitron', monospace;
    font-size: 9px; /* ✅ Kleiner: 12px → 9px */
    color: var(--text-muted);
    margin-top: 4px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    word-break: break-all;
}

/* ✅ Kompakter Quick Battle Button */
#quick-battle-btn {
    width: 100%;
    padding: 8px 16px; /* ✅ Weniger: 12px 20px → 8px 16px */
    font-size: 12px; /* ✅ Kleiner: 14px → 12px */
    margin-top: 5px;
    background: linear-gradient(135deg, #00FF7F, #20c997);
    border: 1px solid #00FF7F;
}

#quick-battle-btn:disabled {
    background: linear-gradient(135deg, #6c757d, #495057);
    border-color: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

/* ✅ Subtle Loading Animation */
@keyframes subtleGlow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(6, 110, 225, 0.3);
    }
    50% { 
        box-shadow: 0 0 15px rgba(6, 110, 225, 0.6);
    }
}

.welcome-card:has(#user-stats:contains("Connecting")) {
    animation: subtleGlow 3s ease-in-out infinite;
}
