* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    width: 100%;
    min-height: 100vh;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
    min-height: 100vh;
    width: 100%;
}

body::-webkit-scrollbar {
    display: none;
}

.container {
    background: #f8f7ff;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    text-align: center;
    flex-shrink: 0;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

header .tagline {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.95;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

main {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Left Panel */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-section h2 {
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 10px;
}

#choiceInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#choiceInput:focus {
    outline: none;
    border-color: #667eea;
}

.choices-list-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.choices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.choices-header h2 {
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

.choices-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
}

.choice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    transition: all 0.3s;
    border-left: 4px solid #667eea;
}

.choice-item:hover {
    background: #efefef;
    transform: translateX(4px);
}

.choice-item span {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.choice-item button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.choice-item button:hover {
    background: #ff5252;
}

/* Right Panel */
.right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
}

#wheelCanvas {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.15));
}

.result-section {
    position: absolute;
    width: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 500;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-tertiary,
.btn-small,
.btn-spin {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-tertiary {
    background: #ff6b6b;
    color: white;
    flex: 1;
}

.btn-tertiary:hover {
    background: #ff5252;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-spin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 40px;
    font-size: 1.2rem;
    width: 100%;
    max-width: 300px;
    transform: scale(1);
}

.btn-spin:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-spin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-spin:active:not(:disabled) {
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        display: flex;
        flex-direction: column-reverse;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    header {
        padding: 12px 10px;
    }

    header h1 {
        font-size: 1.2rem;
    }

    main {
        padding: 10px;
    }

    #wheelCanvas {
        width: 90vw;
        height: 90vw;
        max-width: 90vw;
        max-height: 90vw;
    }

    .result-value {
        font-size: 1.2rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions button {
        width: 100%;
    }
    
    .choices-list {
        max-height: none;
        overflow-y: visible;
    }
    
    .choices-list-section {
        flex: initial;
    }
}

/* Scrollbar styling */
.choices-list::-webkit-scrollbar {
    width: 8px;
}

.choices-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.choices-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 8px;
}

.choices-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Info Section - SEO Content */
.info-section {
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 30px 20px;
    margin-top: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.info-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.info-section h3 {
    font-size: 1.2rem;
    color: #667eea;
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.info-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 1rem;
}

.info-section strong {
    color: #667eea;
    font-weight: 600;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.features-list li {
    padding: 8px 0;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive info section */
@media (max-width: 768px) {
    .info-section {
        padding: 20px 15px;
        margin-top: 15px;
    }
    
    .info-section h2 {
        font-size: 1.3rem;
    }
    
    .info-section h3 {
        font-size: 1.1rem;
    }
}
