:root {
    --primary-color: #3a86ff;
    --primary-light: #8ecae6;
    --primary-dark: #023e8a;
    --secondary-color: #ff9e00;
    --success-color: #38b000;
    --danger-color: #d90429;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --text-secondary: #6c757d;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
    --sidebar-width: 280px;
}

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

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: var(--transition);
    overflow-x: hidden;
}

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

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 30px 20px;
    box-shadow: var(--shadow-md);
    color: white;
    position: relative;
    z-index: 10;
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 40px;
}

.logo h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.logo h2::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: -8px;
    left: 0;
    border-radius: 10px;
}

.nav-links {
    list-style: none;
    margin-top: 20px;
}

.nav-links li {
    margin-bottom: 15px;
    transition: var(--transition);
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a i {
    margin-right: 15px;
    font-size: 18px;
    transition: var(--transition);
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.nav-links li.active a {
    background-color: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.nav-links li.active a i {
    color: var(--primary-color);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 25px;
}

/* Make sections span appropriate columns */
header {
    grid-column: span 12;
}

.quick-actions {
    grid-column: span 12;
}

.devices, .schedules {
    grid-column: span 6;
}

.weather-widget {
    grid-column: span 6;
}

.energy-usage {
    grid-column: span 6;
}

.voice-commands {
    grid-column: span 6;
}

.scene-creator {
    grid-column: span 12;
}

/* Responsive grid adjustments */
@media (max-width: 1200px) {
    .devices, .schedules, .weather-widget, .energy-usage, .voice-commands {
        grid-column: span 12;
    }
}

/* Section styles update for consistency */
section {
    height: 100%;
    margin: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

header h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--card-bg);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.user-info:hover {
    box-shadow: var(--shadow-md);
}

.user-info i {
    font-size: 24px;
    color: var(--primary-color);
}

section {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: slideUp 0.6s ease-out;
}

section:hover {
    box-shadow: var(--shadow-md);
}

section h2 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -8px;
    left: 0;
    border-radius: 10px;
}

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

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Debug styling */
body::after {
    content: "Styles loaded";
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 9999;
}

/* Debug styling for devices section */
.devices {
    position: relative;
}

.devices::after {
    content: "Devices section";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(58, 134, 255, 0.2);
    color: var(--primary-dark);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
}

#devicesGrid {
    min-height: 100px;
    position: relative;
}

#devicesGrid::after {
    content: "Devices grid element";
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-dark);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
}

/* Quick Actions Styles */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.action-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    background-color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* Device Grid Styles */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.device-card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
} 