/**
 * HOKM - Components CSS
 * Wiederverwendbare UI-Komponenten
 */

/* ========== HEADER ========== */
.header {
    background: var(--bg-card);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--accent);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.level-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: bold;
    color: #fff;
    font-size: 0.8em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.coins {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    color: #000;
    font-size: 0.9em;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 12px 18px;
    min-height: 44px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    touch-action: manipulation;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 2px solid var(--accent); }
.btn-green { background: var(--accent-green); color: #000; }
.btn-danger { background: var(--accent); color: #fff; }
.btn-danger:hover, .btn-danger:active { background: #c0392b; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 15px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-dim);
    font-size: 0.9em;
}
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #333;
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 16px;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.error-msg {
    color: var(--accent);
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(233,69,96,0.1);
    border-radius: 8px;
    font-size: 0.9em;
}

/* ========== CARDS ========== */
.action-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
}
.action-card h3 {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 1.1em;
}
.action-card p {
    color: var(--text-dim);
    margin-bottom: 15px;
    font-size: 0.9em;
}

/* ========== STAKE SELECTION ========== */
.stake-select {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.stake-btn {
    padding: 12px 8px;
    border: 2px solid #333;
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text);
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    transition: all 0.2s;
    min-height: 44px;
}
.stake-btn:hover, .stake-btn:active { border-color: var(--accent); }
.stake-btn.active {
    border-color: var(--accent-green);
    background: rgba(78, 204, 163, 0.2);
    color: var(--accent-green);
}

.stake-display {
    text-align: center;
    margin: 12px 0;
    padding: 12px;
    background: rgba(78, 204, 163, 0.1);
    border-radius: 8px;
    border: 2px solid var(--accent-green);
}
.stake-display .amount {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-green);
}
.stake-display .label {
    color: var(--text-dim);
    font-size: 0.85em;
}

.not-enough-coins {
    color: var(--accent);
    font-size: 0.85em;
    margin-top: 8px;
}

/* ========== MESSAGE BOX ========== */
.message-box {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 15px 0;
    font-size: 0.9em;
}
.message-box.success { border: 2px solid var(--accent-green); }
.message-box.info { border: 2px solid var(--accent); }

/* ========== PLAYER SLOTS ========== */
.player-slot {
    padding: 15px;
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #333;
    min-height: 100px;
}
.player-slot.filled { border: 2px solid var(--accent-green); }
.player-slot.you { border-color: var(--accent); }

.player-avatar {
    width: 45px;
    height: 45px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 8px;
}

.team-label {
    font-size: 0.75em;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ========== FULLSCREEN BUTTON ========== */
.fullscreen-btn {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.fullscreen-btn:active { transform: scale(0.95); }
.fullscreen-btn.is-fullscreen { background: var(--accent-green); }

/* ========== ROTATE OVERLAY ========== */
.rotate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    text-align: center;
    padding: 20px;
}
.rotate-overlay .rotate-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: rotatePhone 2s ease-in-out infinite;
}
.rotate-overlay p {
    font-size: 1.2em;
    color: var(--text);
    max-width: 280px;
}
