/* Custom CSS for Spiritual Counter App */

@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@300;400;600;700&display=swap');

:root {
    --primary-pink: #ff6b9d;
    --primary-orange: #ff9a56;
    --dark-orange: #ff6b35;
    --light-pink: #ffe0ec;
    --light-orange: #fff4e6;
    --text-dark: #8b4513;
    --text-light: #d2691e;
    --white: #ffffff;
    --shadow: rgba(255, 107, 157, 0.3);
}

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

body {
    font-family: 'Mukta', sans-serif;
    transition: background 0.3s ease;
    overflow-x: hidden;
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

body.dark-mode .text-orange-800 {
    color: #ffa500 !important;
}

body.dark-mode .text-orange-700 {
    color: #ff8c00 !important;
}

body.dark-mode .text-orange-600 {
    color: #ff7f50 !important;
}

body.dark-mode .bg-white\/80 {
    background-color: rgba(30, 30, 30, 0.8) !important;
}

body.dark-mode .bg-white\/60 {
    background-color: rgba(30, 30, 30, 0.6) !important;
}

body.dark-mode .bg-white {
    background-color: #1e1e1e !important;
}

body.dark-mode .text-gray-600 {
    color: #cccccc !important;
}

body.dark-mode .text-gray-700 {
    color: #dddddd !important;
}

body.dark-mode .border-orange-300 {
    border-color: #ff8c00 !important;
}

body.dark-mode .bg-gray-200 {
    background-color: #333333 !important;
}

body.dark-mode .hover\:bg-gray-300:hover {
    background-color: #444444 !important;
}

body.dark-mode .bg-orange-100 {
    background-color: rgba(255, 140, 0, 0.2) !important;
}

body.dark-mode .hover\:bg-orange-200:hover {
    background-color: rgba(255, 140, 0, 0.3) !important;
}

/* Font Classes */
.font-mukta {
    font-family: 'Mukta', sans-serif;
}

/* Counter Animation */
@keyframes countUp {
    0% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.2) translateY(-5px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

.count-animation {
    animation: countUp 0.3s ease-out;
}

/* Button Press Animation */
@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.button-press {
    animation: buttonPress 0.15s ease-out;
}

/* Progress Bar Animation */
@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.progress-complete {
    animation: progressPulse 1s ease-in-out infinite;
}

/* Modal Animations */
.modal-backdrop {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 154, 86, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-orange));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--dark-orange), var(--primary-orange));
}

/* Smoke Effect Animation */
@keyframes smokeEffect {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        filter: blur(0px);
    }
    25% {
        opacity: 0.8;
        transform: translate(-50%, -60%) scale(1.2) rotate(5deg);
        filter: blur(1px);
    }
    50% {
        opacity: 0.6;
        transform: translate(-45%, -70%) scale(1.5) rotate(-5deg);
        filter: blur(2px);
    }
    75% {
        opacity: 0.3;
        transform: translate(-55%, -80%) scale(1.8) rotate(3deg);
        filter: blur(4px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%) scale(2.5) rotate(0deg);
        filter: blur(8px);
    }
}

@keyframes smokeRise {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -150%) scale(2);
        opacity: 0;
    }
}

.animate-smoke {
    animation: smokeEffect 1.5s ease-out forwards;
}

.animate-smoke-rise {
    animation: smokeRise 1.2s ease-out forwards;
}

/* Different color variations for smoke effect */
.smoke-pink {
    color: #ff1493;
    text-shadow: 0 0 10px #ff1493, 0 0 20px #ff69b4, 0 0 30px #ffb6c1;
}

.smoke-orange {
    color: #ff6347;
    text-shadow: 0 0 10px #ff6347, 0 0 20px #ff8c00, 0 0 30px #ffa500;
}

.smoke-purple {
    color: #9370db;
    text-shadow: 0 0 10px #9370db, 0 0 20px #ba55d3, 0 0 30px #dda0dd;
}

.smoke-gold {
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700, 0 0 20px #ffed4e, 0 0 30px #fff59d;
}

.smoke-blue {
    color: #4169e1;
    text-shadow: 0 0 10px #4169e1, 0 0 20px #6495ed, 0 0 30px #87ceeb;
}

/* Click Area Styling */
#clickArea {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Responsive Design */
@media (max-width: 640px) {
    #counterDisplay {
        font-size: 4rem !important;
    }
    
    #incrementBtn {
        font-size: 1.5rem !important;
        padding: 1.25rem 2rem !important;
    }
    
    .control-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 200px;
    }
    
    .control-buttons button {
        width: 100%;
    }
}

/* Touch Feedback */
@media (hover: none) and (pointer: coarse) {
    button:active {
        transform: scale(0.95);
    }
    
    #incrementBtn:active {
        transform: scale(0.98);
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-white\/80 {
        background-color: rgba(255, 255, 255, 0.95) !important;
    }
    
    .text-orange-800 {
        color: #000000 !important;
    }
    
    .border-orange-300 {
        border-color: #000000 !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
    }
    
    button {
        display: none !important;
    }
    
    .absolute.inset-0 {
        display: none !important;
    }
    
    #counterDisplay {
        color: black !important;
    }
}

/* Focus Styles for Accessibility */
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--primary-orange);
    outline-offset: 2px;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success State */
.success {
    background-color: rgba(34, 197, 94, 0.1) !important;
    border-color: #22c55e !important;
}

/* Error State */
.error {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-color: #ef4444 !important;
}

/* Smooth Transitions */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glass Morphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

body.dark-mode .glass-effect {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

/* Celebration Animation */
@keyframes celebrate {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        transform: scale(1.2) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.celebrate {
    animation: celebrate 0.6s ease-in-out;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}
