/* ==========================================================================
   Global Variables
   ========================================================================== */
:root {
    /* Colors */
    --kc-blue: #273573;
    --kc-dark: #0e192d;
    --kc-red: #ec1d24;
    --kc-red-light: #f47a66;
    --kc-maroon: #a11d25;
    --kc-light: #ededeb;
    --kc-light-transparent: #ededebc0;
    --kc-pastel: #f8d4c8;
    --kc-green: #38761d;
    --kc-green-light: #b6d7a8;

    /* Fonts */
    --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;

    /* Shadows */
    --shadow-drop: 2px 2px 5px rgba(0, 0, 0, 0.5);
    --text-shadow-dark: 2px 2px 5px rgba(0, 0, 0, 0.3);
    --text-shadow-dark-hover: 2px 2px 5px rgba(0, 0, 0, 0.5);
    --text-shadow-light: 2px 2px 5px rgba(255, 255, 255, 0.5);
    --btn-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    --btn-box-shadow-hover: 0 6px 12px var(--kc-red-light);
}

/* ==========================================================================
   Global Reset & Base Styling
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    /* The global background uses a gradient based on red/dark/blue */
    background: linear-gradient(135deg, var(--kc-red), var(--kc-dark), var(--kc-dark), var(--kc-blue));
    color: var(--kc-light);
    font-family: var(--font-sans);
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   Donation Card (Container)
   ========================================================================== */
.donation-card {
    background: var(--kc-light-transparent);
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    padding: 1rem;
    text-align: center;
    margin: 0 auto;
}

/* ==========================================================================
   Logo & Headings
   ========================================================================== */
.header-logo {
    display: block;
    margin: 0 auto 1.5rem;
    width: 120px;
    filter: drop-shadow(var(--shadow-drop));
}

h1 {
    color: var(--kc-blue);
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    text-shadow: var(--text-shadow-dark);
}

.description {
    color: var(--kc-blue);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-shadow: var(--text-shadow-dark);
}

/* ==========================================================================
   Wheel Styles
   ========================================================================== */
.wheel-wrapper {
    position: relative;
    width: 90%;
    aspect-ratio: 1;
    margin: 2rem auto 0.5rem;
    overflow: visible;
}

/* Center horizontally by using absolute positioning */
.wheel-wrapper .wheel-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: grab;
    transition: transform 0.5s ease-out;
}

.wheel-wrapper .wheel-container:active {
    cursor: grabbing;
}

/* Scale Pulse Animation */
@keyframes scaleUpDown {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
    100% { transform: translateX(-50%) scale(1); }
}
.animate-scale {
    animation: scaleUpDown 0.5s ease;
}

/* Static Labels Layer */
.static-labels {
    transform: translate(0, 1%);
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
    position: relative;
    width: 90%;
    aspect-ratio: 1;
    pointer-events: none;
    overflow: visible;
}

.wheel-label {
    fill: var(--kc-blue);
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
    transition: transform 0.5s ease;
    pointer-events: all;
    text-shadow: var(--text-shadow-dark);
    cursor: pointer;
}

.wheel-label:active {
    fill: var(--kc-red);
    font-weight: 900;
    text-shadow: var(--text-shadow-dark-hover);
    transform: scale(2.5);
}

.static-labels text.value-label {
    font-size: 1.2rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    display: flex;
    font-size: 0.8rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    gap: 8px;
    font-family: 'Figtree', sans-serif;
    text-shadow: var(--text-shadow-light);
}

.footer svg {
    filter: drop-shadow(var(--text-shadow-light));
    display: inline-block;
}

.footer a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Rotating Dial & Markers
   ========================================================================== */
.rotating-dial {
    touch-action: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-out;
}

.rotating-dial circle {
    fill: url(#dialGradient);
}

.wheel-pointer {
    fill: var(--kc-red-light);
    stroke: var(--kc-red);
}

/* ==========================================================================
   Fine tuning overlay (inside the wheel-wrapper)
   ========================================================================== */
.fine-tuning-overlay {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}
.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}
.fade-enter-to,
.fade-leave-from {
    opacity: 1;
}

.fine-tuning-content {
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
    color: var(--kc-light);
    padding: 1.5rem;
    width: 200px;
    border-radius: 64px;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    text-shadow: var(--text-shadow-dark);
}

/* ==========================================================================
   Center Donation Amount
   ========================================================================== */
.wheel-amount {
    touch-action: none;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--kc-light);
    text-shadow: var(--text-shadow-dark);
}

/* ==========================================================================
   Donate Button
   ========================================================================== */
.btn-donate {
    display: inline-block;
    background: var(--kc-red-light);
    color: white;
    border: none;
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    box-shadow: var(--btn-box-shadow);
    text-decoration: none;
}

.btn-donate .donate-icon {
    width: 32px;
    height: 32px;
    filter: url(#white-outline);
    margin: 0 8px;
    vertical-align: middle;
}

.btn-donate:hover {
    background: var(--kc-red);
    transform: translateY(-3px);
    box-shadow: var(--btn-box-shadow-hover);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes pulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}
.pulse {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes heartBeat {
    20%, 60% { transform: scale(1); }
    40% { transform: scale(1.2); }
}
.heart-beat {
    animation: heartBeat 3s infinite ease-in-out;
    filter: drop-shadow(2px 2px 5px var(--kc-red-light));
}

@keyframes heartBeat2 {
    40%, 80% { transform: scale(1); }
    60% { transform: scale(1.4); }
}
.heart-beat2 {
    animation: heartBeat2 3s infinite ease-in-out;
    filter: drop-shadow(2px 2px 5px var(--kc-red-light));
}

