:root {
    --primary: #ff1744;
    --secondary: #ff4081;
    --accent: #ff80ab;
    --bg-start: #1a0a1f;
    --bg-end: #2d1b3d;
    --text-light: #ffffff;
    --text-glow: rgba(255, 23, 68, 0.8);
    --wheel-glow: rgba(255, 23, 68, 0.6);
}

[data-theme="romantic"] {
    --primary: #ff1744;
    --secondary: #ff4081;
    --accent: #ff80ab;
    --bg-start: #1a0a1f;
    --bg-end: #2d1b3d;
    --text-glow: rgba(255, 23, 68, 0.8);
    --wheel-glow: rgba(255, 23, 68, 0.6);
}

[data-theme="playful"] {
    --primary: #ff69b4;
    --secondary: #ffc0cb;
    --accent: #ffb6c1;
    --bg-start: #2d1b3d;
    --bg-end: #4a2b5c;
    --text-glow: rgba(255, 105, 180, 0.8);
    --wheel-glow: rgba(255, 105, 180, 0.6);
}

[data-theme="mystery"] {
    --primary: #9c27b0;
    --secondary: #ba68c8;
    --accent: #ce93d8;
    --bg-start: #0a0a1f;
    --bg-end: #1a1a3d;
    --text-glow: rgba(156, 39, 176, 0.8);
    --wheel-glow: rgba(156, 39, 176, 0.6);
}

[data-theme="candy"] {
    --primary: #ff6f61;
    --secondary: #ffb3ba;
    --accent: #ffd1dc;
    --bg-start: #3d2b1f;
    --bg-end: #5c3a2b;
    --text-glow: rgba(255, 111, 97, 0.8);
    --wheel-glow: rgba(255, 111, 97, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease;
}

.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.heart-float {
    position: absolute;
    font-size: 20px;
    animation: floatUp 4s ease-in infinite;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--text-glow);
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 300;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 50px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.love-points {
    font-size: 1.1rem;
    font-weight: 600;
}

.heart-icon {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1);
    }
}

.love-title {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
}

.theme-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px var(--wheel-glow);
}

.theme-btn.active {
    background: var(--primary);
    box-shadow: 0 0 30px var(--wheel-glow);
    transform: scale(1.15);
}

.love-calculator-input {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

#lovePercentage {
    padding: 12px 20px;
    border: 2px solid var(--primary);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 1rem;
    width: 155px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

#lovePercentage:focus {
    box-shadow: 0 0 20px var(--wheel-glow);
    transform: scale(1.05);
}

#lovePercentage::-webkit-inner-spin-button,
#lovePercentage::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#lovePercentage {
  -moz-appearance: textfield;
}

.set-love-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.set-love-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--wheel-glow);
}

/* Custom Alert Box */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.custom-alert-overlay.show {
  visibility: visible;
  opacity: 1;
}

.custom-alert-box {
  background: linear-gradient(145deg, var(--secondary), var(--accent));
  color: var(--text-light);
  padding: 25px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 25px var(--text-glow);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.custom-alert-overlay.show .custom-alert-box {
  transform: scale(1);
}

.custom-alert-box h3 {
  margin-top: 0;
  font-size: 1.4rem;
  text-shadow: 0 0 10px var(--text-glow);
}

.custom-alert-box p {
  margin: 10px 0 20px;
  font-size: 1rem;
}

.alert-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.alert-btn:hover {
  background: var(--secondary);
  color: var(--bg-start);
}

.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 40px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    color: var(--primary);
    z-index: 10;
    filter: drop-shadow(0 0 10px var(--wheel-glow));
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 50px var(--wheel-glow), 0 0 100px var(--wheel-glow);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.spin-button {
    display: block;
    margin: 30px auto;
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--wheel-glow);
    }

    50% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 40px var(--wheel-glow);
    }
}

.spin-button:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), 0 0 60px var(--wheel-glow);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.love-meter-container {
    margin: 30px auto;
    max-width: 400px;
}

.love-meter-label {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.love-meter {
    position: relative;
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.love-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 20px;
    transition: width 1s ease;
    box-shadow: 0 0 20px var(--wheel-glow);
}

.love-meter-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.love-boost {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    animation: boostFloat 2s ease-out forwards;
}

@keyframes boostFloat {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    margin: 10% auto;
    padding: 40px;
    border: 2px solid var(--primary);
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 50px var(--wheel-glow);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.result-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.result-icon {
    text-align: center;
    font-size: 4rem;
    margin: 20px 0;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.result-text {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.result-description {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-light);
    line-height: 1.6;
}

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

.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.whatsapp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.6);
}

.copy-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--wheel-glow);
}

.mini-game-content {
    max-width: 600px;
}

#miniGameContent {
    margin: 30px 0;
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.8;
}

.quote-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    font-style: italic;
}

.quiz-option {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary);
    border-radius: 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.quiz-option:hover {
    background: var(--primary);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .wheel-container {
        width: 300px;
        height: 300px;
    }

    .spin-button {
        padding: 15px 40px;
        font-size: 1.2rem;
    }

    .stats-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .modal-content {
        margin: 20% auto;
        padding: 30px 20px;
    }

    .result-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .wheel-container {
        width: 250px;
        height: 250px;
    }

    .theme-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}