/* Grundlayout – optimiert für 9:16 Hochformat */
.ptcf-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;
}

.ptcf-start-screen,
.ptcf-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);
}

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

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

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

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

.ptcf-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;
}

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

.ptcf-target-color-box {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 3px solid rgba(0,0,0,0.08);
    background: #ff3366;
    display: inline-block;
}

.ptcf-target-name {
    font-weight: 700;
    min-width: 60px;
    text-align: left;
}

.ptcf-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);
}

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

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

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

.ptcf-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;
}

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

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

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

.ptcf-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;
}

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

.ptcf-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;
}

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

.ptcf-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);
}

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

.ptcf-target-pill {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
}

.ptcf-target-pill .ptcf-target-color-box {
    width: 24px;
    height: 24px;
}

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

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

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