.wheel-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wheel-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
    justify-content: center;
}

@media (min-width: 968px) {
    .wheel-layout {
        grid-template-columns: 1fr 400px;
    }
}

.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
}

.wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #dc3545;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.3));
    z-index: 10;
}

.wheel-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    background: #003366;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: bold; font-size: 14px;
    cursor: pointer; z-index: 5;
    transition: transform 0.2s;
}
.wheel-center:hover { transform: translate(-50%, -50%) scale(1.1); }
.wheel-center:active { transform: translate(-50%, -50%) scale(0.95); }

.spin-button {
    margin-top: 20px;
    background: #28a745; color: white; border: none;
    padding: 15px 40px; font-size: 18px; font-weight: 600;
    border-radius: 50px; cursor: pointer; transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(40,167,69,0.4);
}
.spin-button:hover { background:#218838; transform:translateY(-2px); box-shadow:0 6px 20px rgba(40,167,69,0.6); }
.spin-button:disabled { background:#6c757d; cursor:not-allowed; transform:none; box-shadow:none; }

.controls-section {
    background: white; padding: 25px;
    border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Entry type tabs */
.entry-tabs {
    display: flex; gap: 0; margin-bottom: 14px;
    border: 2px solid #e0e0e0; border-radius: 8px; overflow: hidden;
}
.entry-tab {
    flex: 1; padding: 9px 10px; background: #f8f9fa;
    border: none; cursor: pointer; font-size: 13px; font-weight: 600;
    color: #666; transition: all .2s;
}
.entry-tab.active { background: #003366; color: white; }

/* ── Main panel tabs (Entries / Winners) ── */
.panel-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #003366;
}
.panel-tab {
    flex: 1;
    padding: 11px 10px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #003366;
    transition: all .2s;
    position: relative;
    letter-spacing: .01em;
}
.panel-tab:first-child { border-right: 1px solid #003366; }
.panel-tab.active {
    background: #003366;
    color: #fff;
}
.panel-tab:hover:not(.active) { background: #eef2ff; }

/* Winner count badge on tab */
.winner-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
}
.panel-tab.active .winner-badge { background: #fff; color: #dc3545; }

.input-group {
    display: flex; gap: 10px; margin-bottom: 15px;
}
.input-group input[type="text"] {
    flex: 1; padding: 12px; border: 2px solid #e0e0e0;
    border-radius: 6px; font-size: 15px;
}
.input-group input[type="text"]:focus { outline: none; border-color: #003366; }
.input-group button {
    padding: 12px 25px; background: #003366; color: white;
    border: none; border-radius: 6px; cursor: pointer; font-weight: 600; transition: background 0.3s;
}
.input-group button:hover { background: #002244; }

/* Image entry row */
.img-entry-row {
    display: flex; gap: 8px; align-items: center; margin-bottom: 15px; flex-wrap: wrap;
}
.img-entry-row input[type="text"] {
    flex: 1; min-width: 100px; padding: 10px 12px;
    border: 2px solid #e0e0e0; border-radius: 6px; font-size: 14px;
}
.img-entry-row input[type="file"] {
    flex: 1.2; min-width: 120px; font-size: 12px;
    border: 2px dashed #e0e0e0; border-radius: 6px; padding: 8px; cursor: pointer;
}
.img-entry-row button {
    padding: 10px 18px; background: #003366; color: white;
    border: none; border-radius: 6px; cursor: pointer;
    font-weight: 600; font-size: 13px; transition: background .2s; white-space: nowrap;
}
.img-entry-row button:hover { background: #002244; }

.names-list {
    max-height: 300px; overflow-y: auto;
    margin-top: 20px; border: 2px solid #e0e0e0; border-radius: 6px; padding: 10px;
}
.name-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px; background: #f8f9fa; margin-bottom: 8px;
    border-radius: 4px; transition: background 0.2s;
}
.name-item:hover { background: #e9ecef; }
.name-item > span { flex: 1; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.name-item > span img { width:32px; height:32px; border-radius:50%; object-fit:cover; border:2px solid #ddd; flex-shrink:0; }
.name-item button { background:#dc3545; color:white; border:none; padding:5px 12px; border-radius:4px; cursor:pointer; font-size:12px; transition:background 0.2s; }
.name-item button:hover { background: #c82333; }

.control-buttons {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px;
}
.control-buttons button { padding: 10px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.clear-btn { background: #dc3545; color: white; }
.clear-btn:hover { background: #c82333; }
.shuffle-btn { background: #ffc107; color: #000; }
.shuffle-btn:hover { background: #e0a800; }

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 999; display: none;
}
.overlay.show { display: block; }

.winner-modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    z-index: 1000; text-align: center;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
    min-width: 320px; max-width: 90vw; overflow: hidden;
}
.winner-modal.show { transform: translate(-50%, -50%) scale(1); }
.winner-content { padding: 40px 50px; }
.winner-emoji { font-size: 56px; line-height: 1; margin-bottom: 10px; }
.winner-title { color: #003366; font-size: 22px; margin: 0 0 10px; font-weight: 700; }
.winner-name { font-size: 34px; color: #28a745; font-weight: 800; margin: 10px 0 5px; word-break: break-word; }
.winner-img-preview {
    width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
    border: 4px solid #28a745; margin: 12px auto 4px; display: none;
}
.close-btn { padding:12px 28px; background:#003366; color:white; border:none; border-radius:8px; font-size:16px; font-weight:700; cursor:pointer; transition:background .2s; }
.close-btn:hover { background: #002244; }

.stats-panel { margin-top: 20px; border-top: 1px solid #e0e0e0; padding-top: 15px; }