/* Theme Variables */

/*this file contains app colors and clouds and theme swithcer and some features styles*/
[data-theme="light"] {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #95a5a6;
    --text-color: #2c3e50;
    --background-light: #f0f2f5;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --cloud-color: rgba(255, 255, 255, 0.95);
    --star-color: #ffd700;
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: #e1e1e1;
    --cloud-shadow: rgba(0, 0, 0, 0.15);
    --feature-icon-color: #2c7a7b;
    --feature-icon-bg: rgba(44, 122, 123, 0.1);
    --feature-icon-hover: #38b2ac;
    --feature-icon-hover-bg: rgba(44, 122, 123, 0.2);
    --primary-rgb: 46, 204, 113;
    --primary-dark-rgb: 39, 174, 96;
}

[data-theme="dark"] {
    --primary-color: #00b894;
    --primary-dark: #00a885;
    --secondary-color: #b2bec3;
    --text-color: #ecf0f1;
    --background-light: #1a1a1a;
    --panel-bg: rgba(45, 52, 54, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --cloud-color: rgba(74, 92, 102, 0.8);
    --star-color: #ffffff;
    --input-bg: rgba(45, 52, 54, 0.9);
    --input-border: #404040;
    --cloud-shadow: rgba(0, 0, 0, 0.2);
    --feature-icon-color: #4fd1c5;
    --feature-icon-bg: rgba(79, 209, 197, 0.1);
    --feature-icon-hover: #81e6d9;
    --feature-icon-hover-bg: rgba(79, 209, 197, 0.2);
    --primary-rgb: 0, 184, 148;
    --primary-dark-rgb: 0, 168, 133;
}

/* Feature Section Theme Variables */
:root {
    --feature-icon-bg: rgba(var(--primary-color-rgb), 0.1);
    --feature-icon-color: var(--primary-color);
    --feature-icon-hover-bg: rgba(var(--primary-color-rgb), 0.2);
    --feature-icon-hover: var(--primary-color);
    --feature-text-color: var(--text-color);
    --feature-border-color: rgba(var(--primary-color-rgb), 0.1);
}

[data-theme="dark"] {
    --feature-icon-bg: rgba(255, 255, 255, 0.05);
    --feature-icon-color: rgba(255, 255, 255, 0.9);
    --feature-icon-hover-bg: rgba(255, 255, 255, 0.1);
    --feature-icon-hover: #ffffff;
    --feature-text-color: rgba(255, 255, 255, 0.9);
    --feature-border-color: rgba(255, 255, 255, 0.1);
}

/* Theme Switcher Styles */
.theme-switch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--hover-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    border: none;
    padding: 0;
}

.theme-switch:hover {
    background-color: var(--active-bg);
}

.switch-handle {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch-handle i {
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Theme-specific icon display */
[data-theme="light"] .moon-icon,
[data-theme="dark"] .sun-icon {
    display: none;
}

/* Ripple effect */
.theme-switch .ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-bg: #1a1a1a;
    --secondary-bg: #2d2d2d;
    --hover-bg: rgba(255, 255, 255, 0.05);
    --active-bg: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --primary-bg: #ffffff;
    --secondary-bg: #f5f5f5;
    --hover-bg: rgba(0, 0, 0, 0.05);
    --active-bg: rgba(0, 0, 0, 0.1);
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: rgba(0, 0, 0, 0.1);
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Enhanced Stars */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background: var(--star-color);
    border-radius: 50%;
    animation: twinkle var(--duration, 2s) ease-in-out infinite;
    opacity: 0;
    box-shadow: 0 0 3px var(--star-color);
}


[data-theme="light"] .star {
    box-shadow: 0 0 4px var(--star-color),
                0 0 8px var(--star-color);
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0.5); 
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1); 
    }
}


/*the feature icons*/
.fa-user-shield::before {
    color: var(--primary-bg);
  }
.fa-shield-alt::before {
    color: var(--primary-bg);
  }
.fa-sync::before {
    color: var(--primary-bg);
  }
/* Enhanced Clouds */
.clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: var(--cloud-color);
    border-radius: 20px;
    opacity: 0;
    filter: blur(4px);
    box-shadow: 0 5px 15px var(--cloud-shadow);
    transition: all 0.3s ease;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

[data-theme="light"] .cloud {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.98),
        rgba(255, 255, 255, 0.85)
    );
    opacity: 0.9;
    box-shadow: 
        0 5px 15px var(--cloud-shadow),
        0 0 20px rgba(255, 255, 255, 0.5);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
    box-shadow: inherit;
}

.cloud::before {
    width: 65%;
    height: 150%;
    top: -40%;
    left: 15%;
}

.cloud::after {
    width: 45%;
    height: 120%;
    top: -20%;
    right: 15%;
}

/* Cloud Animations */
.cloud-1 { animation: float-1 20s linear infinite; }
.cloud-2 { animation: float-2 25s linear infinite; }
.cloud-3 { animation: float-3 22s linear infinite; }
.cloud-4 { animation: float-4 28s linear infinite; }
.cloud-5 { animation: float-5 24s linear infinite; }
.cloud-6 { animation: float-6 26s linear infinite; }
.cloud-7 { animation: float-7 23s linear infinite; }
.cloud-8 { animation: float-8 27s linear infinite; }

@keyframes float-1 {
    from { left: -120px; top: 10%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    to { left: 100%; top: 10%; opacity: 0; }
}

@keyframes float-2 {
    from { left: -100px; top: 25%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    to { left: 100%; top: 25%; opacity: 0; }
}

@keyframes float-3 {
    from { left: -150px; top: 40%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    to { left: 100%; top: 40%; opacity: 0; }
}

@keyframes float-4 {
    from { left: -90px; top: 55%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    to { left: 100%; top: 55%; opacity: 0; }
}

@keyframes float-5 {
    from { left: -130px; top: 70%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    to { left: 100%; top: 70%; opacity: 0; }
}

@keyframes float-6 {
    from { left: -110px; top: 85%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    to { left: 100%; top: 85%; opacity: 0; }
}

@keyframes float-7 {
    from { left: -140px; top: 32%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    to { left: 100%; top: 32%; opacity: 0; }
}

@keyframes float-8 {
    from { left: -95px; top: 62%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    to { left: 100%; top: 62%; opacity: 0; }
}

/* Feature Section Theme-Specific Styles */
.features-section {
    background: var(--card-bg);
    color: var(--feature-text-color);
}

.features-header {
    background: var(--feature-icon-bg);
    border-color: var(--feature-border-color);
}

.feature-item {
    background: var(--feature-icon-bg);
    border-color: var(--feature-border-color);
}

.feature-item:hover,
.feature-item:focus {
    background: var(--feature-icon-hover-bg);
}

.feature-item i {
    color: var(--feature-icon-color);
}

.feature-item:hover i,
.feature-item:focus i {
    color: var(--feature-icon-hover);
}

/* Theme-specific styles */
[data-theme="dark"] body {
    background: var(--background-light);
}

[data-theme="dark"] .auth-container {
    background: var(--panel-bg);
    box-shadow: 0 15px 30px var(--shadow-color);
}

[data-theme="dark"] .input-group input {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-color);
}

[data-theme="dark"] .input-group i {
    color: var(--secondary-color);
}

[data-theme="dark"] .features-list li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .features-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments for theme switcher */
@media (max-width: 768px) {
    .theme-switch-wrapper {
        top: 10px;
        right: 10px;
    }
    
    .theme-switch {
        width: 50px;
        height: 50px;
    }
    
    .sun-icon,
    .moon-icon {
        font-size: 20px;
    }
}
