@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --bg-color: #f9fafb;
    --container-bg: #ffffff;
    --text-color: #1f2937;
    --highlight-bg: #eef2ff;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
}

.dark-mode {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --bg-color: #111827;
    --container-bg: #1f2937;
    --text-color: #f3f4f6;
    --highlight-bg: #374151;
    --border-color: #374151;
    --shadow-color: rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background-color: var(--container-bg);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--shadow-color);
    overflow: hidden;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.auth-container {
    display: flex;
    gap: 0.75rem;
}

.main-content {
    padding: 2rem;
}

.tab-content {
    display: none;
}

.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

h3 {
    margin: 1.5rem 0 1rem;
    font-weight: 500;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--container-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.stats-card {
    background-color: var(--highlight-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.ad-section {
    margin-top: 2rem;
    text-align: center;
}

.ad-container {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-color);
    opacity: 0.6;
}

.ad-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(79, 70, 229, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    background-color: var(--container-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.footer p {
    margin: 0.5rem 0;
}

.heart {
    color: var(--danger-color);
}

.mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    z-index: 100;
    transition: all 0.3s ease;
}

.mode-toggle:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--container-bg);
    padding: 1rem;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.cookie-banner p {
    margin: 0;
    padding-right: 1rem;
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Ad Animation */
.ad-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ad-animation-content {
    text-align: center;
    padding: 2rem;
}

.ad-animation h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.pulse {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: relative;
    margin: 1rem auto 2rem auto;
}

.pulse:before, .pulse:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

.pulse:after {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.coin-animation {
    position: fixed;
    font-size: 2rem;
    color: gold;
    pointer-events: none;
    z-index: 1000;
    animation: floatUp 3s forwards;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px);
    }
}

/* Styles for Why Choose and How to Use sections */
.info-section {
    background-color: var(--highlight-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-content h4 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.feature-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.steps-container {
    margin-top: 1.5rem;
}

.step-item {
    display: flex;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.step-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Enhanced animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Form animations */
.input-group input {
    transform-origin: left;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.input-group input:focus {
    transform: scale(1.02);
}

/* Dashboard card hover effects */
.stats-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Feature and step hover effects */
.feature-item, .step-item {
    transition: transform 0.3s ease;
}

.feature-item:hover, .step-item:hover {
    transform: translateY(-3px);
}

.feature-icon, .step-number {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.feature-item:hover .feature-icon, .step-item:hover .step-number {
    transform: scale(1.1);
    background-color: var(--primary-hover);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Responsive styles */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo {
        justify-content: center;
    }
    
    .stats-card {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-banner {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-banner p {
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .header, .main-content, .footer {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .auth-container {
        flex-direction: column;
        width: 100%;
    }
    
    .auth-container button {
        width: 100%;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .feature-item, .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon, .step-number {
        margin: 0 auto 0.75rem auto;
    }
}

/* Dark mode overrides */
.dark-mode .ad-animation {
    background-color: rgba(31, 41, 55, 0.95);
}

.dark-mode input::placeholder {
    color: rgba(243, 244, 246, 0.5);
}

/* Additional accessibility improvements */
.btn:focus, input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print styles */
@media print {
    .mode-toggle, .cookie-banner, .ad-section, .auth-container {
        display: none !important;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}