/* Grundlayout – optimiert für 9:16 Hochformat */
.ptsr-wrapper {
    width: 100%;
    height: 100%;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    background: radial-gradient(circle at top, #ffe8a3, #ffb3d9);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    user-select: none;
    touch-action: manipulation;
}

.ptsr-start-screen,
.ptsr-end-screen {
    text-align: center;
    max-width: 520px;
    width: 100%;
    padding: 2rem 1.5rem;
    border-radius: 24px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.ptsr-wrapper h1,
.ptsr-wrapper h2,
.ptsr-wrapper p {
    margin: 0.5em 0;
}

.ptsr-wrapper h1 {
    font-size: 2.4rem;
}

.ptsr-wrapper h2 {
    font-size: 2rem;
}

.ptsr-wrapper p {
    font-size: 1.2rem;
}

.ptsr-target-preview {
    margin: 1.2rem auto 1.5rem;
    padding: 1rem 1.2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    font-size: 1.2rem;
}

.ptsr-target-label {
    font-weight: 600;
}

.ptsr-target-shape {
    width: 26px;
    height: 26px;
    display: inline-block;
    position: relative;
}

.ptsr-target-shape-circle {
    border-radius: 999px;
    background: #ffd93b;
}

.ptsr-target-shape-square {
    border-radius: 8px;
    background: #6c5ce7;
}

.ptsr-target-shape-triangle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 4px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-bottom: 22px solid #ff7675;
}

.ptsr-target-shape-star::before {
    content: "★";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #00cec9;
}

.ptsr-settings-panel {
    margin: 1rem auto 1.5rem;
    padding: 1rem 1rem 1.3rem;
    border-radius: 24px;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

.ptsr-settings-group {
    margin-bottom: 0.8rem;
}

.ptsr-settings-title {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.ptsr-pill-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ptsr-pill {
    min-width: 56px;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 2px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.9);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
}

.ptsr-pill-active {
    background: linear-gradient(135deg, #ff7ad9, #ffcc33);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.ptsr-pill:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(0,0,0,0.16);
}

.ptsr-speed-hint {
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: rgba(0,0,0,0.6);
}

.ptsr-button {
    font-size: 1.4rem;
    padding: 0.9rem 2rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #ff7ad9, #ffcc33);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.ptsr-button:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.ptsr-game-screen {
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 1000px;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    border-radius: 24px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

.ptsr-topbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.ptsr-topbar-item {
    text-align: center;
    background: rgba(255,255,255,0.9);
    padding: 0.4rem 0.6rem;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ptsr-topbar-item span {
    font-weight: 700;
    font-size: 1.3rem;
}

.ptsr-canvas-container {
    flex: 1;
    margin-top: 0.2rem;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(#6fb8ff, #e6f7ff);
    position: relative;
}

#ptsr-canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

/* Kleine Bildschirme / quer */
@media (max-width: 768px) {
    .ptsr-wrapper {
        padding: 0.5rem;
    }
    .ptsr-game-screen {
        max-width: 100%;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }
}
