:root {
    --primary: #007AFF;
    --primary-hover: #005bb5;
    --danger: #FF3B30;
    --text-main: #1c1c1e;
    --text-muted: #8e8e93;
    --bg-body: #f2f2f7;
    --bg-container: rgba(255, 255, 255, 0.85);
    --border-color: rgba(255, 255, 255, 0.4);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    margin: 0;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.app-wrapper {
    flex: 1;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}
/* Bubble Background */
.bubble-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.08);
    animation: float 15s infinite ease-in-out alternate;
    filter: blur(40px);
}
.bubble-1 { width: 400px; height: 400px; top: -100px; left: -100px; }
.bubble-2 { width: 500px; height: 500px; bottom: -150px; right: -100px; animation-delay: -2s; background: rgba(52, 199, 89, 0.08); }
.bubble-3 { width: 300px; height: 300px; bottom: 20%; left: 20%; animation-delay: -5s; background: rgba(255, 59, 48, 0.05); }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -50px) scale(1.1); }
}
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}
.container {
    background: var(--bg-container);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    width: 98%;
    max-width: 600px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}
h1 {
    margin-top: 0;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 5px;
    font-weight: 700;
}
.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 15px;
}
.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 14px;
}
select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d1d6;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    background: rgba(255,255,255,0.8);
    color: var(--text-main);
}
select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}
textarea {
    resize: vertical;
}
.spinner-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    margin: 30px auto;
    border-radius: 16px;
    background: rgba(255,255,255,0.6);
    border: 4px solid var(--border-color);
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.05), 0 10px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}
.spinner-window {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}
.spinner-track {
    display: flex;
    height: 100%;
    transition: transform 4s cubic-bezier(0.1, 0.9, 0.2, 1);
    will-change: transform;
}
.spinner-item {
    flex: 0 0 150px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    border-right: 2px solid rgba(255,255,255,0.2);
    box-sizing: border-box;
    text-align: center;
    padding: 0 15px;
    word-wrap: break-word;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
.spinner-pointer-up, .spinner-pointer-down {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.spinner-pointer-down {
    top: 0;
    border-top: 18px solid #e74c3c;
}
.spinner-pointer-up {
    bottom: 0;
    border-bottom: 18px solid #e74c3c;
}
.spinner-wrapper.spinning .spinner-pointer-down {
    animation: bounceDown 0.3s infinite alternate;
}
.spinner-wrapper.spinning .spinner-pointer-up {
    animation: bounceUp 0.3s infinite alternate;
}
@keyframes bounceDown {
    0% { top: 0; }
    100% { top: -6px; }
}
@keyframes bounceUp {
    0% { bottom: 0; }
    100% { bottom: -6px; }
}
.spinner-wrapper::before, .spinner-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 5;
    pointer-events: none;
}
.spinner-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.8), transparent);
}
.spinner-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.8), transparent);
}
button {
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#spinBtn {
    margin: 0 auto;
    width: 100%;
    max-width: 250px;
}
button:active {
    transform: scale(0.96);
}
button:disabled {
    background-color: #d1d1d6;
    color: #8e8e93;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}
.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}
.result-container {
    position: relative;
    margin-top: 25px;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d1d1d6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}
.result-container::before {
    content: '';
    position: absolute;
    width: 250%;
    height: 250%;
    background: conic-gradient(from 0deg, transparent 70%, var(--primary) 100%);
    animation: runningBorder 1.5s linear infinite;
    display: none;
    z-index: 0;
}
.result-container.spinning::before {
    display: block;
}
.result-container.show-result::before {
    display: block;
    background: conic-gradient(from 0deg, transparent 70%, #2ecc71 100%);
    animation: runningBorder 3s linear infinite;
}
.result-container::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #fff;
    border-radius: 9px;
    z-index: 1;
}
@keyframes runningBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.result {
    position: relative;
    z-index: 2;
    font-size: 22px;
    font-weight: bold;
    color: var(--text-main);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s;
}
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; color: #2ecc71; }
}
.result.show-result {
    animation: popIn 0.5s ease-out forwards;
}
.hidden { display: none !important; }

.info-container {
    background: var(--bg-container);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    width: 98%;
    max-width: 1200px;
    box-sizing: border-box;
    z-index: 1;
    margin-top: 30px;
}
.info-container h2 {
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}
.info-container p, .info-container li {
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 15px;
}
.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 10px;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    width: 100%;
    max-width: none;
    margin: 0;
    background: none;
    border: none;
    text-align: left;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    box-shadow: none !important;
    border-radius: 0;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.faq-answer p {
    padding-bottom: 15px;
    color: var(--text-muted);
    margin: 0;
}
.arrow {
    transition: transform 0.3s;
    font-size: 12px;
}
.faq-item.active .arrow {
    transform: rotate(180deg);
}

@media (min-width: 769px) {
    .info-container {
        width: 80%;
    }
}
