/* Base Theme Styles */
:root {
    --purple: #8B5CF6;
    --blue: #60A5FA;
    --cyan: #22D3EE;
    --dark: #1a1a2e;
    --light: #f8fafc;
    --light-gray: #f1f5f9;
    --card-dark: rgba(30, 30, 50, 0.7);
    --card-light: rgba(255, 255, 255, 1);
    --gradient: linear-gradient(to right, var(--purple), var(--blue), var(--cyan));
    --text-gradient: var(--gradient);
    --transition-speed: 0.4s;
}

/* Shared Styles for Smooth Transitions */
body {
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.bg-gray-800\/30,
a,
button,
.stat-card,
svg,
h1, h2, h3 {
    transition: background-color var(--transition-speed) ease, 
                color var(--transition-speed) ease, 
                border-color var(--transition-speed) ease,
                box-shadow var(--transition-speed) ease,
                transform var(--transition-speed) ease;
}

/* Theme Selector Toggle */
.theme-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 30px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.theme-light .theme-selector {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.theme-selector:hover {
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.theme-toggle {
    position: relative;
    width: 50px;
    height: 24px;
    margin: 0 8px;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(139, 92, 246, 0.3);
    transition: 0.4s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--purple);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.theme-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.theme-light .theme-icon {
    color: var(--dark);
}

/* Dark Mode (Default) */
.theme-dark {
    background-color: var(--dark);
    color: white;
}

.theme-dark .bg-gray-800\/30 {
    background: var(--card-dark) !important;
    border: 1px solid rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.theme-dark .bg-gray-800\/30:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.theme-dark h1 {
    text-shadow: 0 5px 30px rgba(139, 92, 246, 0.5);
}

.theme-dark a,
.theme-dark button {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.theme-dark a::before,
.theme-dark button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1));
    transition: left 0.7s ease;
    z-index: -1;
}

.theme-dark a:hover::before,
.theme-dark button:hover::before {
    left: 100%;
}

.theme-dark a:hover,
.theme-dark button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.theme-dark .stat-card {
    position: relative;
    border: 1px solid rgba(139, 92, 246, 0.2);
    overflow: hidden;
}

.theme-dark .stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.theme-dark .stat-card:hover::after {
    opacity: 1;
}

/* Header with subtle animated gradient for dark mode */
.theme-dark header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--purple), var(--blue), var(--cyan), transparent);
    opacity: 0.5;
}

/* Light Mode */
.theme-light {
    background-color: var(--light) !important;
    color: var(--dark) !important;
}

.theme-light .bg-gray-800\/30 {
    background: var(--card-light) !important;
    border: 1px solid rgba(139, 92, 246, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.theme-light .bg-gray-800\/30:hover {
    border-color: rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.1);
    transform: translateY(-5px);
}

.theme-light p, 
.theme-light li {
    color: #333 !important;
}

.theme-light h1 {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.theme-light h2 {
    color: var(--purple) !important;
    background: none;
    position: relative;
    display: inline-block;
}

.theme-light h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.theme-light h2:hover::after {
    width: 100%;
}

.theme-light h3 {
    color: var(--purple) !important;
}

.theme-light .stat-card {
    background: var(--light-gray);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.theme-light .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.2);
}

.theme-light footer {
    background: var(--light-gray);
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.theme-light a,
.theme-light button {
    background: var(--gradient) !important;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.theme-light a::before,
.theme-light button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--purple), var(--blue));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.theme-light a:hover::before,
.theme-light button:hover::before {
    opacity: 1;
}

.theme-light a:hover,
.theme-light button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.theme-light header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(96, 165, 250, 0.05));
    z-index: -1;
}

.theme-light .animated-gradient-text {
    color: #333;
    background: none;
    -webkit-text-fill-color: initial;
}

/* Subtle pattern for light mode */
.theme-light {
    background-image: 
        radial-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        radial-gradient(rgba(96, 165, 250, 0.02) 1px, transparent 1px);
    background-size: 30px 30px, 40px 40px;
    background-position: 0 0, 15px 15px;
}

/* Parallax Effect for both themes */
@media (min-width: 768px) {
    .parallax-section {
        transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
} 