:root {
    --bg-light: #f0f4f8;
    --text-light: #2d3748;
    --card-light: #ffffff;
    --card-hover-light: #edf2f7;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --accent-light: #4f46e5;
    
    --bg-dark: #1a202c;
    --text-dark: #f7fafc;
    --card-dark: #2d3748;
    --card-hover-dark: #4a5568;
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --accent-dark: #818cf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    min-height: 100vh;
    transition: all 0.5s ease;
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

body.light {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.dark {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem;
    position: relative;
    z-index: 2;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-align: center;
    background: linear-gradient(135deg, 
        var(--accent-light) 0%,
        #818cf8 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 auto;
}

.dark h1 {
    background: linear-gradient(135deg, 
        var(--accent-dark) 0%,
        #a5b4fc 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#themeToggle {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10;
    background-color: var(--card-light);
    box-shadow: 0 2px 10px var(--shadow-light);
}

.dark #themeToggle {
    background-color: var(--card-dark);
    box-shadow: 0 2px 10px var(--shadow-dark);
}

#themeToggle:hover {
    transform: scale(1.1);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    padding: 2rem;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3.5rem 2.5rem;
    border-radius: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s ease;
    text-align: center;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.light .card {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px var(--shadow-light);
}

.dark .card {
    background-color: rgba(45, 55, 72, 0.9);
    box-shadow: 0 4px 20px var(--shadow-dark);
}

.card:hover {
    transform: translateY(-10px);
}

.light .card:hover {
    background-color: var(--card-hover-light);
}

.dark .card:hover {
    background-color: var(--card-hover-dark);
}

.icon {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    animation: gentleBounce 3s ease-in-out infinite;
}

.card span {
    font-size: 1.6rem;
    font-weight: 500;
    margin-top: 1.5rem;
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 4rem 1rem;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .card {
        padding: 2.5rem;
    }
    
    .icon {
        font-size: 4rem;
    }
}



/* area.html */


.back-button {
    position: absolute;
    left: 2rem;
    font-size: 2rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.back-button:hover {
    transform: scale(1.1);
}


.forward-button {
    position: absolute;
    right: 2rem;
    font-size: 2rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.forward-button:hover {
    transform: scale(1.1);
}


.area-card {
    position: relative;
}

.area-info {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-weight: 300;
}

.fronius-section {
    margin-top: 4rem;
    padding: 2rem;
    border-radius: 1.5rem;
    backdrop-filter: blur(10px);
}

.light .fronius-section {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dark .fronius-section {
    background-color: rgba(45, 55, 72, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fronius-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark .fronius-section h2 {
    background: linear-gradient(135deg, #818cf8 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fronius-container {
    width: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#fronius-display {
    width: 100%;
    text-align: center;
}

#fronius-display iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 1rem;
}

/* Room Control Styles */
.back-button {
    position: absolute;
    left: 2rem;
    font-size: 2rem;
    text-decoration: none;
    transition: transform 0.3s ease;
    color: var(--accent-light);
}

.dark .back-button {
    color: var(--accent-dark);
}

.back-button:hover {
    transform: translateX(-5px);
}

/* Status Card */
.status-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    border-radius: 1.5rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.light .status-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 244, 248, 0.95) 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dark .status-card {
    background: linear-gradient(135deg, rgba(45, 55, 72, 0.95) 0%, rgba(26, 32, 44, 0.95) 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.status-card.pool-temp {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.1) 100%);
}

.status-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.status-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.temp-display {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    animation: pulse 2s infinite;
}

/* Control Grid */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.control-card {
    padding: 2rem;
    border-radius: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.light .control-card {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.dark .control-card {
    background: rgba(45, 55, 72, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.control-card:hover {
    transform: translateY(-5px);
}

.light .control-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.dark .control-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.control-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-icon {
    font-size: 2rem;
}

.control-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

/* Power Button */
.power-button {
    width: 100%;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 2px solid rgba(79, 70, 229, 0.3);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(129, 140, 248, 0.05) 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.power-button:hover {
    transform: scale(1.02);
    border-color: rgba(79, 70, 229, 0.5);
}

.power-button.active {
    background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.power-button.loading {
    opacity: 0.6;
    cursor: wait;
}

.power-icon {
    font-size: 1.5rem;
}

.power-state {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Control Status */
.control-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    transition: all 0.3s ease;
}

.status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: pulse 2s infinite;
}

/* WLED Color Controls */
.color-controls {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .color-controls {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.color-picker {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.color-preset {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: var(--accent-light);
}

.brightness-slider {
    width: 100%;
    margin-top: 1rem;
}

.brightness-slider input {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    background: linear-gradient(to right, #1a202c, #fbbf24);
}

.brightness-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-light);
    cursor: pointer;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.action-button {
    padding: 1rem 2rem;
    border-radius: 2rem;
    border: none;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(129, 140, 248, 0.1) 100%);
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .action-button {
    color: var(--text-dark);
}

.action-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.action-button span {
    font-size: 1.2rem;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .control-grid {
        grid-template-columns: 1fr;
    }
    
    .status-card {
        flex-direction: column;
        text-align: center;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
        justify-content: center;
    }
}