/* style.css */
:root {
    --bg: #09090b;
    --card: #18181b;
    --accent: #22c55e;
    --text: #ffffff;
    --text-muted: #a1a1aa;
    --border: #27272a;
}

body {
    background-image: url('background.png');
    background-size: cover;          
    background-position: center;     
    background-repeat: no-repeat;    
    background-attachment: fixed;    
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding: 60px 20px;
    min-height: 100vh;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }

/* Karten Design */
.shop-grid, .admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: rgba(24, 24, 27, 0.7); 
    backdrop-filter: blur(12px);       
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
}

.card:hover { border-color: var(--accent); }

/* Inputs & Buttons */
input {
    background: #000;
    border: 1px solid var(--border);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 10px;
}

button, .login-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

/* --- NEUE STILE FÜR KATEGORIEN & FORTSCHRITTSBALKEN --- */
.alert { 
    padding: 15px; border-radius: 8px; margin-bottom: 20px; text-align: center; font-weight: 600; 
}
.alert-error { background: rgba(239, 68, 68, 0.15); border: 1px solid #ef4444; color: #f87171; }
.alert-success { background: rgba(34, 197, 94, 0.15); border: 1px solid var(--accent); color: #4ade80; }

.category-section { 
    margin-bottom: 50px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: 12px; padding: 25px; backdrop-filter: blur(8px);
}
.category-title { 
    font-size: 1.8rem; font-weight: 700; margin-bottom: 20px; color: var(--text); border-left: 4px solid var(--accent); padding-left: 15px; 
}

.incentive-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

.progress-container { 
    background: #27272a; border-radius: 10px; height: 14px; width: 100%; margin: 15px 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); 
}
.progress-bar { 
    background: linear-gradient(90deg, #22c55e, #4ade80); height: 100%; width: 0%; transition: width 0.4s ease; 
}
.quick-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; max-width: 300px; }
.quick-btn { 
    background: #27272a; border: 1px solid var(--border); color: var(--text); padding: 6px; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.1s; 
}
.quick-btn:hover { background: #3f3f46; border-color: var(--text-muted); }
.game-list { color: var(--text-muted); line-height: 1.6; font-size: 1.1rem; margin-bottom: 15px; }

/* --- STREAMER TWITCH AVATAR WIDGET --- */
.user-profile-widget {
    display: flex;
    align-items: center;
    background: rgba(24, 24, 27, 0.8);
    border: 1px solid var(--border);
    padding: 6px 14px 6px 6px;
    border-radius: 50px; /* Komplett abgerundete Pille */
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: border-color 0.2s;
}

.user-profile-widget:hover {
    border-color: rgba(34, 197, 94, 0.4);
}

.avatar-container {
    position: relative;
    width: 40px;
    height: 40px;
}

.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent); /* Grüner Leuchtrahmen */
}

.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #3f3f46;
    border: 2px solid var(--text-muted);
}

/* Glow-Effekt */
.avatar-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
    opacity: 0.5;
    pointer-events: none;
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.user-points-badge {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent);
}

.logout-link {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: 4px;
}

.logout-link:hover {
    color: #ef4444; /* Wird beim Hover rot */
    background: rgba(239, 68, 68, 0.1);
}

/* Globale Box-Sizing Korrektur gegen das Herausfallen aus Containern */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Einheitliches, gleichmäßiges Design für Formularelemente */
input[type="text"],
input[type="number"],
select,
button,
.redeem-btn {
    width: 100% !important; /* Füllt den zugewiesenen Platz perfekt aus */
    height: 46px !important; /* Absolut identische Höhe für alle Elemente */
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    font-family: inherit;
    border-radius: 8px !important;
    margin: 0 !important; /* Verhindert unregelmäßige Abstände */
    display: block;
}

/* Spezifische Anpassung für Inputs und Select-Boxen */
input[type="text"],
input[type="number"],
select {
    background: #000000 !important;
    border: 1px solid var(--border) !important;
    color: #ffffff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Dropdown-Pfeil fixen für einheitlichen Look */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
    cursor: pointer;
}

/* Quick-Pick Grid Fix */
.quick-pick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}
.quick-btn {
    height: 36px !important; /* Schnellauswahl-Buttons leicht kompakter */
    padding: 0 !important;
    line-height: 36px !important;
    background: #27272a !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px !important;
    transition: all 0.2s;
}
.quick-btn:hover {
    background: #3f3f46 !important;
    border-color: var(--text-muted) !important;
}