/**
 * style-v11.css
 * Fixes: Text Vertical Alignment, Fullscreen UI Cleanup
 */

:root {
    --primary: #8a2be2;
    --bg: #121212;
    --text: #eee;
    --card-bg: #1e1e1e;
    --border: #444;
    --wheel-border: #fff;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body.theme-light {
    --primary: #007bff; --bg: #f4f7f6; --text: #333; --card-bg: #ffffff; --border: #ddd;
}

body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); display: flex; flex-direction: column; min-height: 100vh; }
* { box-sizing: border-box; }

/* Top Bar */
.top-bar {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    padding: 10px 20px; background: var(--card-bg); border-bottom: 1px solid var(--border);
    position: relative; z-index: 500;
}
/* Wenn Fullscreen aktiv ist, blenden wir die Navigation komplett aus */
body.is-fullscreen .top-bar { display: none !important; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: bold; font-size: 1.2rem; }
.controls { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.user-badge { background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 15px; font-size: 0.85rem; }

/* Layout */
.app-layout { flex: 1; display: flex; flex-direction: column; }
.content-grid {
    flex: 1; display: grid; gap: 2rem; padding: 1rem;
    max-width: 1400px; margin: 0 auto; width: 100%;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) { .content-grid { grid-template-columns: 1fr 400px; align-items: start; } .wheel-area { position: sticky; top: 20px; } }

/* Wheel Area */
.wheel-area { position: relative; z-index: 10; }
.wheel-toolbar { display: flex; gap: 8px; margin-bottom: 10px; justify-content: flex-end; }
.wheel-container {
    position: relative; width: 100%; max-width: 600px;
    aspect-ratio: 1 / 1; margin: 0 auto;
    transition: all 0.3s ease;
}

.wheel {
    width: 100%; height: 100%; border-radius: 50%;
    border: 8px solid var(--wheel-border);
    position: relative; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    /* Wichtig: Transform-Origin für Rotation */
    transform-origin: center center;
}

/* Marker */
.marker {
    position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; z-index: 20;
    border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 45px solid #e63946;
    filter: drop-shadow(0 4px 2px rgba(0,0,0,0.4));
}

.spin-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80px; height: 80px; border-radius: 50%;
    border: 5px solid var(--wheel-border); background: var(--primary); color: white;
    font-weight: 800; cursor: pointer; z-index: 30;
    box-shadow: 0 0 20px rgba(0,0,0,0.3); transition: 0.2s;
}
.spin-btn:hover { transform: translate(-50%, -50%) scale(1.05); }

/* Fullscreen Logic */
.wheel-container.fullscreen {
    position: fixed !important; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh; max-width: none; margin: 0;
    background: rgba(0,0,0,0.95); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    border-radius: 0;
}
.wheel-container.fullscreen .wheel {
    width: min(90vw, 90vh); height: min(90vw, 90vh); border-width: 0;
}

/* Close Button unten mittig positioniert - stört dort am wenigsten */
.fs-close-global {
    display: none; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(255,255,255,0.2); color: white; border: 2px solid rgba(255,255,255,0.5);
    font-size: 2rem; font-weight: bold; cursor: pointer;
    z-index: 3000; backdrop-filter: blur(5px);
    align-items: center; justify-content: center; transition: 0.2s;
}
.fs-close-global:hover { background: rgba(255,255,255,0.4); transform: translateX(-50%) scale(1.1); }
body.is-fullscreen .fs-close-global { display: flex; }

/* Wheel Text Alignment Fix */
.sector-text {
    position: absolute; top: 50%; left: 50%; width: 50%; height: 0;
    transform-origin: 0 0; 
    text-align: right; 
    pointer-events: none;
}
.sector-text span {
    display: inline-block; 
    padding-right: 40px; 
    color: white; 
    font-weight: 800; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    /* WICHTIG V11: Vertikale Zentrierung auf der Linie */
    transform: translateY(-50%); 
    line-height: 1; /* Verhindert Offset durch Zeilenhöhe */
}

/* UI Standard Elements */
.card { background: var(--card-bg); padding: 20px; border-radius: 10px; border: 1px solid var(--border); }
.card-header { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 15px; }
#inputs-container { max-height: 400px; overflow-y: auto; padding-right: 5px; margin-bottom: 15px; }
.input-row { display: flex; gap: 5px; margin-bottom: 5px; }
.color-picker { width: 40px; border: none; padding: 0; cursor: pointer; background: none; }
input, textarea { flex: 1; padding: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 4px; }
.btn { padding: 10px 20px; border-radius: 5px; border: none; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--border); }
.btn-xs { padding: 5px 10px; font-size: 0.8rem; background: var(--border); border: none; border-radius: 4px; cursor: pointer; color: var(--text); }
.btn-del { width: 40px; background: #3f1515; color: #ff6b6b; border: 1px solid #5a2020; border-radius: 4px; cursor: pointer; }
.ctrl-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border); color: var(--text); cursor: pointer; font-size: 1.2rem; }
.btn-icon { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }
.action-buttons { display: flex; gap: 10px; margin-top: 10px; }
.action-buttons button { flex: 1; }
#result-display { text-align: center; font-size: 1.5rem; font-weight: bold; margin-top: 1rem; color: var(--primary); min-height: 1.5em; }

/* Modal & Social */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 4000; display: flex; justify-content: center; align-items: center; padding: 10px; }
.modal { background: var(--card-bg); width: 100%; max-width: 400px; padding: 25px; border-radius: 10px; position: relative; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.close-modal { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }
.social-logins { display: flex; flex-direction: column; gap: 8px; margin: 15px 0; max-height: 300px; overflow-y: auto; }
.social-row { display: flex; gap: 5px; align-items: center; }
.social-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 5px; text-decoration: none; font-weight: bold; font-size: 0.9rem; overflow: hidden; }
.social-btn img { width: 20px; height: 20px; flex-shrink: 0; object-fit: contain; }
.divider { text-align: center; color: #888; margin: 15px 0; font-size: 0.8rem; position: relative; }
.divider::before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: var(--border); z-index: -1; }
.divider span { background: var(--card-bg); padding: 0 10px; }

/* Toast */
#toast-container { position: fixed; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: 5px; pointer-events: auto; opacity: 0; transform: translateY(10px); transition: 0.3s; font-weight: bold; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #2e7d32; color: #fff; border-left: 5px solid #1b5e20; }
.toast.error   { background: #c62828; color: #fff; border-left: 5px solid #8e0000; }