:root {
    --bg-color: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    
    --radha-primary: #e91e63;
    --radha-bg: #fff0f5;
    --radha-card: linear-gradient(135deg, #fff0f5 0%, #ffe4e1 100%);
    
    --hari-primary: #4CAF50;
    --hari-bg: #f0fff0;
    --hari-card: linear-gradient(135deg, #f0fff0 0%, #e8f5e9 100%);
    
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-weight: 700;
}

.main-title {
    text-align: center;
    font-size: 2.2rem;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.hindi-title {
    font-family: 'Mukta', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.screen {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hidden {
    display: none !important;
}

/* Page Transitions */
.page-enter {
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* Selection Screen */
.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.mantra-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mantra-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mantra-card:nth-child(1) {
    background: var(--radha-card);
    border-color: #ffebf0;
}

.mantra-card:nth-child(2) {
    background: var(--hari-card);
    border-color: #ebfff0;
}

.mantra-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.mantra-card:active {
    transform: translateY(2px);
}

.mantra-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: #9c27b0;
    color: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(156, 39, 176, 0.3);
}

.radha-icon {
    background: linear-gradient(135deg, #ba68c8, #9c27b0);
}

.hari-icon {
    background: linear-gradient(135deg, #81c784, #4caf50);
}

.radha-text, .hari-text {
    font-family: 'Mukta', sans-serif;
    font-size: 1.5rem;
    margin: 0.5rem 0;
    font-weight: 600;
}

.radha-text { color: var(--radha-primary); }
.hari-text { color: var(--hari-primary); }

.mantra-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.mantra-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Counter Screen */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.back-btn, .reset-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    background: #f8fafc;
}

.back-btn:hover, .reset-btn:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f1f5f9;
    width: fit-content;
    margin: 0 auto 2rem;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    color: #334155;
    font-variant-numeric: tabular-nums;
    font-size: 1.1rem;
}

.counter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin: 2rem 0 4rem;
}

.progress-ring-container {
    position: relative;
    cursor: pointer;
    user-select: none;
    border-radius: 50%;
    transition: transform 0.1s;
    touch-action: manipulation;
}

.progress-ring-container:active {
    transform: scale(0.96);
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.count-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #dbeafe;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

#current-count {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.tap-hint {
    margin-top: 1.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
    padding: 1.25rem 0.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #ffefe5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card:nth-child(1) { background: linear-gradient(180deg, #fff0f5 0%, #fff 100%); border-color: #fce8e8; }
.stat-card:nth-child(2) { background: linear-gradient(180deg, #fff8e1 0%, #fff 100%); border-color: #fef0ce; }
.stat-card:nth-child(3) { background: linear-gradient(180deg, #f3f0ff 0%, #fff 100%); border-color: #e8e2fa; }

.stat-icon {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
}

/* Floating Animation Elements */
#floating-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    pointer-events: none;
    z-index: 10;
}

.floating-text {
    position: absolute;
    font-family: 'Mukta', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    opacity: 0;
    user-select: none;
    animation: floatUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
    15% {
        opacity: 0.8;
        transform: translate(calc(var(--tx-start) * 0.3), calc(var(--ty-start) * 0.3)) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx-end), var(--ty-end)) scale(0.9);
    }
}
