/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo h2 {
    margin: 0;
}

.logo-link {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.nav-menu a.active {
    background: rgba(37, 99, 235, 0.15);
    font-weight: 600;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #2563eb;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main content with animated background */
.main-content {
    padding: 60px 0;
    min-height: calc(100vh - 140px);
    position: relative;
    overflow: hidden;
}

/* Floating particles animation */
.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.03) 0%, transparent 50%);
    animation: float-particles 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float-particles {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-10px) translateX(-15px) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-30px) translateX(5px) scale(1.05);
        opacity: 0.7;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 50px;
    text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
    position: relative;
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% {
        text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1),
                     0 0 10px rgba(37, 99, 235, 0.1);
    }
    100% {
        text-shadow: 0 2px 4px rgba(37, 99, 235, 0.2),
                     0 0 20px rgba(37, 99, 235, 0.2),
                     0 0 30px rgba(37, 99, 235, 0.1);
    }
}

/* Spinner container */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.wheel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    min-height: 750px;
    position: relative;
}

/* Sparkle effects around the wheel */
.wheel-container::before,
.wheel-container::after {
    content: '✨';
    position: absolute;
    font-size: 2rem;
    animation: sparkle 4s ease-in-out infinite;
    opacity: 0.7;
    z-index: 5;
}

.wheel-container::before {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.wheel-container::after {
    bottom: 10%;
    right: 10%;
    animation-delay: 2s;
}

@keyframes sparkle {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-10px) rotate(90deg) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg) scale(0.8);
        opacity: 0.5;
    }
    75% {
        transform: translateY(-10px) rotate(270deg) scale(1.1);
        opacity: 0.9;
    }
}

.wheel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wheelCanvas {
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.2);
    border: 4px solid #2563eb;
    transition: filter 0.5s ease;
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #2563eb;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Spin button - Blue theme with animations */
.spin-button {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    color: white;
    border: 3px solid #1d4ed8;
    padding: 20px 60px;
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4), 
                inset 0 2px 10px rgba(255, 255, 255, 0.3),
                0 0 20px rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: blue-glow 2s ease-in-out infinite alternate,
               pulse-ring 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Blue glow animation */
@keyframes blue-glow {
    0% { 
        box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4), 
                    inset 0 2px 10px rgba(255, 255, 255, 0.3),
                    0 0 20px rgba(37, 99, 235, 0.2);
    }
    100% { 
        box-shadow: 0 15px 40px rgba(37, 99, 235, 0.6), 
                    inset 0 3px 15px rgba(255, 255, 255, 0.5),
                    0 0 30px rgba(37, 99, 235, 0.4);
    }
}

/* Pulse ring animation */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Spinning shimmer effect */
.spin-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50px;
    animation: shimmer 2s linear infinite;
    z-index: -1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(200%) rotate(45deg);
    }
}

/* Hover effects */
.spin-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.7), 
                inset 0 3px 15px rgba(255, 255, 255, 0.5),
                0 0 40px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
    animation: blue-glow 1s ease-in-out infinite alternate,
               hover-pulse 0.6s ease-in-out infinite;
}

@keyframes hover-pulse {
    0%, 100% {
        transform: translateY(-3px) scale(1.05);
    }
    50% {
        transform: translateY(-3px) scale(1.08);
    }
}

/* Disabled state */
.spin-button:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 50%, #4b5563 100%);
    cursor: not-allowed;
    transform: none;
    animation: none;
    box-shadow: 0 4px 16px rgba(156, 163, 175, 0.2);
    border-color: #6b7280;
}

.spin-button:disabled::before {
    display: none;
}

/* Active/pressed state */
.spin-button:active:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5), 
                inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Custom questions section */
.custom-questions-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.custom-questions-section h3 {
    color: #2563eb;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.custom-questions-section p {
    color: #6b7280;
    margin-bottom: 20px;
}

.question-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2563eb;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-label {
    font-weight: 500;
    color: #374151;
}

/* Custom panel */
.custom-panel {
    text-align: left;
    margin-top: 20px;
}

.textarea-form {
    margin-bottom: 20px;
}

.textarea-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #374151;
}

.textarea-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
}

.textarea-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.textarea-form button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.textarea-form button:hover {
    background: #1d4ed8;
}

.questions-info {
    background: rgba(37, 99, 235, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.questions-info p {
    margin: 5px 0;
    color: #374151;
}

.info-text {
    font-size: 0.9rem;
    color: #6b7280;
}

#questionCount {
    font-weight: 600;
    color: #2563eb;
}

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

.clear-btn,
.sample-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.clear-btn {
    background: #ef4444;
    color: white;
}

.clear-btn:hover {
    background: #dc2626;
}

.sample-btn {
    background: #10b981;
    color: white;
}

.sample-btn:hover {
    background: #059669;
}

/* Result modal */
.result-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.result-content {
    background: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-content h3 {
    color: #2563eb;
    font-size: 1.5rem;
    margin-bottom: 20px;
    animation: title-bounce 0.6s ease-out 0.3s both;
}

@keyframes title-bounce {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    60% {
        opacity: 1;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-content p {
    font-size: 1.2rem;
    color: #374151;
    margin-bottom: 30px;
    line-height: 1.6;
    animation: text-reveal 0.8s ease-out 0.5s both;
    position: relative;
}

@keyframes text-reveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: white;
}

.footer-section h3 {
    font-size: 1.5rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    #wheelCanvas {
        width: 300px;
        height: 300px;
    }
    
    .spin-button {
        padding: 15px 40px;
        font-size: 1.2rem;
    }
    
    .custom-questions-section {
        padding: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    #wheelCanvas {
        width: 250px;
        height: 250px;
    }
    
    .spin-button {
        padding: 12px 30px;
        font-size: 1.1rem;
    }
}