:root {
    --primary-color: #3498db;
    --secondary-color: #ffd700;
    --accent-color: #e74c3c;
    --background-color: #000000;
    --card-background: #1a1a1a;
    --card-hover: #2a2a2a;
    --text-color: #ffffff;
    --text-light: #bdc3c7;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

/* Light Theme */
body.light-theme {
    --background-color: #ffffff;
    --card-background: #f5f5f5;
    --card-hover: #e8e8e8;
    --text-color: #000000;
    --text-light: #4a4a4a;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* Header */
.dashboard-header {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}

/* Light Theme - Blue text for logo */
body.light-theme .logo {
    color: #3498db; /* Blue instead of yellow */
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text-light);
    font-weight: 500;
}

.theme-toggle-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.theme-toggle-btn:hover {
    background-color: var(--card-hover);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logout-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.logout-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.widgets-sidebar {
    width: 280px;
    min-width: 200px;
    max-width: 600px;
    background-color: var(--card-background);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    overflow-y: auto;
    position: relative;
}

.widgets-sidebar.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
    border-right: none;
}

/* Resize handle for sidebar */
.sidebar-resize-handle {
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    background-color: transparent;
    z-index: 100;
    transition: background-color 0.2s ease;
    border-right: 2px solid transparent;
}

.sidebar-resize-handle:hover {
    background-color: rgba(52, 152, 219, 0.3);
    border-right-color: var(--primary-color);
}

.sidebar-resize-handle.resizing {
    background-color: rgba(52, 152, 219, 0.5);
    border-right-color: var(--primary-color);
}

/* Floating Sidebar Toggle Button */
.floating-sidebar-toggle {
    background-color: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.floating-sidebar-toggle:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.toggle-sidebar {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: var(--transition);
}

.toggle-sidebar:hover {
    color: var(--secondary-color);
}

.widgets-list {
    padding: 1rem;
    flex: 1;
}

.widget-category {
    margin-bottom: 2rem;
}

.widget-category h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.widget-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.widget-item {
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    border: 1px solid transparent;
}

.widget-item:hover {
    background-color: rgba(41, 128, 185, 0.2);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.widget-item.active {
    background-color: rgba(41, 128, 185, 0.3);
    border-color: var(--primary-color);
}

/* Main Content */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Chat Section */
.chat-section {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 400px;
    min-height: 200px;
    max-height: 80vh;
    position: relative;
    overflow: hidden;
}

.chat-section.collapsed {
    height: 60px;
    min-height: 60px;
    overflow: hidden;
}

.chat-section.collapsed .chat-messages,
.chat-section.collapsed .chat-input-container {
    display: none;
}

/* Resize handle for chat section */
.chat-resize-handle {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 8px;
    cursor: row-resize;
    background-color: transparent;
    z-index: 100;
    transition: background-color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.chat-resize-handle:hover {
    background-color: rgba(52, 152, 219, 0.3);
    border-bottom-color: var(--primary-color);
}

.chat-resize-handle.resizing {
    background-color: rgba(52, 152, 219, 0.5);
    border-bottom-color: var(--primary-color);
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.chat-header .collapse-chat-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    transition: var(--transition);
    margin-right: 0.5rem;
}

.chat-header .collapse-chat-btn:hover {
    color: var(--secondary-color);
}

.avatar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animated avatar styles */
.ai-avatar.animated {
    animation: avatarFloat 3s ease-in-out infinite;
}

.ai-avatar.animated .avatar-face {
    animation: avatarPulse 2s ease-in-out infinite;
}

/* 3D avatar styles */
.ai-avatar.three-d {
    animation: avatarRotate 4s ease-in-out infinite;
    transform-style: preserve-3d;
}

.ai-avatar.three-d .avatar-face {
    animation: avatarGlow 2.5s ease-in-out infinite;
}

/* Keyframe animations */
@keyframes avatarFloat {
    0%, 100% {
        transform: translateY(0px) scale(var(--avatar-scale, 1));
    }
    50% {
        transform: translateY(-8px) scale(calc(var(--avatar-scale, 1) * 1.05));
    }
}

@keyframes avatarPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes avatarRotate {
    0%, 100% {
        transform: rotateY(0deg) translateY(0px) scale(var(--avatar-scale, 1));
    }
    25% {
        transform: rotateY(5deg) translateY(-5px) scale(var(--avatar-scale, 1));
    }
    50% {
        transform: rotateY(0deg) translateY(-8px) scale(calc(var(--avatar-scale, 1) * 1.05));
    }
    75% {
        transform: rotateY(-5deg) translateY(-5px) scale(var(--avatar-scale, 1));
    }
}

@keyframes avatarGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 5px rgba(74, 144, 226, 0.5));
    }
    50% {
        filter: brightness(1.2) drop-shadow(0 0 15px rgba(74, 144, 226, 0.8));
    }
}

.avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #2ecc71;
    border: 2px solid var(--card-background);
}

.avatar-status.typing {
    background-color: var(--secondary-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.avatar-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.avatar-status-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.chat-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.control-btn:hover {
    background-color: rgba(41, 128, 185, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.control-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.message-content {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.user-message .message-content {
    background-color: rgba(41, 128, 185, 0.2);
}

.message-speaker-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
    padding: 0;
}

.message-speaker-btn:hover {
    background-color: rgba(74, 144, 226, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.message-speaker-btn.playing {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    animation: pulse 1.5s infinite;
}

.message-speaker-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message-content p {
    margin: 0;
    line-height: 1.6;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    display: block;
}

.chat-input-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.input-buttons-left {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-shrink: 0;
    padding-bottom: 2px; /* Slight adjustment to align with textarea border */
}

.input-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.input-btn:hover {
    background-color: rgba(41, 128, 185, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.input-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.input-btn .icon {
    font-size: 1.1rem;
}

.input-btn input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    top: 0;
    left: 0;
}

.chat-input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    transition: var(--transition);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.08);
}

.send-btn {
    background-color: var(--primary-color);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-hints {
    margin-top: 0.5rem;
}

.hint {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

/* Widgets Section */
.widgets-section {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.widgets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.widgets-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.widgets-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Light Theme - Blue text for dashboard header */
body.light-theme .widgets-header h2 {
    color: #3498db; /* Blue instead of yellow */
}

.widget-controls {
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 200px; /* Fixed row height - each row is exactly 200px */
    gap: 1.5rem;
    align-items: start; /* Prevent widgets in same row from stretching to match tallest */
    align-content: start; /* Align grid content to start, preventing extra space */
}

.widget-placeholder {
    grid-column: span 12; /* Full width */
    text-align: center;
    padding: 4rem 2rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
}

.widget-placeholder p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.hint-text {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* Widget Card */
.widget-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
    align-self: start; /* Prevent stretching to match tallest widget in row */
    overflow: hidden; /* Prevent content from overflowing */
}

.widget-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* Widget Size Classes */
.widget-card.widget-size-small {
    grid-column: span 3 !important; /* 1 column (3/12) */
    grid-row: span 1 !important; /* 1 row */
    height: 100%; /* Fill exactly 1 row (200px) */
}

.widget-card.widget-size-medium {
    grid-column: span 6 !important; /* 2 columns (6/12) */
    grid-row: span 2 !important; /* 2 rows */
    height: 100%; /* Fill exactly 2 rows (400px = 200px * 2) */
}

.widget-card.widget-size-large {
    grid-column: span 9 !important; /* 3 columns (9/12) */
    grid-row: span 3 !important; /* 3 rows */
    height: 100%; /* Fill exactly 3 rows (600px = 200px * 3) */
}

.widget-card.widget-size-extra-large {
    grid-column: span 12 !important; /* 4 columns (12/12) */
    grid-row: span 4 !important; /* 4 rows */
    height: 100%; /* Fill exactly 4 rows (800px = 200px * 4) */
}

/* Responsive widget sizing */
@media (max-width: 1200px) {
    .widget-card.widget-size-small {
        grid-column: span 4 !important; /* 1 column on medium screens */
        grid-row: span 1 !important; /* 1 row */
    }
    
    .widget-card.widget-size-medium {
        grid-column: span 8 !important; /* 2 columns on medium screens */
        grid-row: span 2 !important; /* 2 rows */
    }
    
    .widget-card.widget-size-large {
        grid-column: span 12 !important; /* Full width on medium screens */
        grid-row: span 3 !important; /* 3 rows */
    }
    
    .widget-card.widget-size-extra-large {
        grid-column: span 12 !important; /* Full width on medium screens */
        grid-row: span 4 !important; /* 4 rows */
    }
}

@media (max-width: 768px) {
    .widget-card.widget-size-small {
        grid-column: span 12 !important; /* All widgets full width on mobile */
        grid-row: span 1 !important; /* 1 row */
    }
    
    .widget-card.widget-size-medium {
        grid-column: span 12 !important; /* All widgets full width on mobile */
        grid-row: span 2 !important; /* 2 rows */
    }
    
    .widget-card.widget-size-large {
        grid-column: span 12 !important; /* All widgets full width on mobile */
        grid-row: span 3 !important; /* 3 rows */
    }
    
    .widget-card.widget-size-extra-large {
        grid-column: span 12 !important; /* All widgets full width on mobile */
        grid-row: span 4 !important; /* 4 rows */
    }
}

.widget-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; /* Prevent header from shrinking */
}

.widget-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.widget-card-actions {
    display: flex;
    gap: 0.5rem;
}

.widget-action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
    position: relative;
}

.widget-action-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Enhanced tooltip styling for action buttons */
.widget-action-btn[title] {
    position: relative;
}

.widget-action-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 0.6rem;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
    margin-bottom: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.widget-action-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 1001;
    margin-bottom: -4px;
}

.widget-card-content {
    color: var(--text-light);
    flex: 1; /* Expand to fill available vertical space */
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Allow scrolling if content exceeds available space */
    min-height: 0; /* Important for flex children to allow shrinking */
}

.widget-instructions {
    text-align: center;
    padding: 1rem 0;
}

.widget-icon-large {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.widget-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.widget-examples {
    margin-top: 1.5rem;
    text-align: left;
}

.examples-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.examples-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.examples-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.examples-list li::before {
    content: '💬';
    position: absolute;
    left: 0;
}

.widget-try-btn {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
    width: 100%;
}

.widget-try-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.widget-data-display {
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    flex: 1; /* Expand to fill available space in widget-card-content */
    min-height: 0; /* Important for flex children to allow shrinking */
    overflow-y: auto; /* Allow scrolling if content exceeds available space */
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    margin: auto;
    position: relative;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.theme-options {
    display: flex;
    gap: 1rem;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.theme-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.setting-item label {
    min-width: 80px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.setting-item input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.setting-item input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

.setting-item input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.setting-item input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

.setting-item input[type="color"] {
    width: 50px;
    height: 35px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.setting-item input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.setting-item input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: var(--border-radius);
}

.setting-item select,
#selectedVoice {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

/* Specific styling for voice select with size attribute */
#selectedVoice[size] {
    display: block !important;
    visibility: visible !important;
    min-height: 200px !important;
    max-height: 300px !important;
    height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    padding: 0.5rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    background: var(--bg-secondary) !important;
    color: var(--text-color) !important;
    font-size: 0.9rem !important;
    font-family: inherit !important;
    -webkit-appearance: listbox !important;
    -moz-appearance: listbox !important;
    appearance: listbox !important;
    cursor: default !important;
}

#selectedVoice[size] option {
    display: block !important;
    padding: 0.75rem 0.5rem !important;
    background: var(--bg-secondary) !important;
    color: var(--text-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-height: 2rem !important;
}

#selectedVoice[size] option:hover,
#selectedVoice[size] option:focus {
    background: var(--card-hover) !important;
    color: var(--text-color) !important;
}

#selectedVoice[size] option:checked,
#selectedVoice[size] option:selected {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Custom scrollbar for voice select */
#selectedVoice[size]::-webkit-scrollbar {
    width: 10px !important;
}

#selectedVoice[size]::-webkit-scrollbar-track {
    background: var(--bg-secondary) !important;
    border-radius: 5px !important;
}

#selectedVoice[size]::-webkit-scrollbar-thumb {
    background: var(--border-color) !important;
    border-radius: 5px !important;
}

#selectedVoice[size]::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color) !important;
}

/* Ensure voice select slider thumbs are hidden (prevent range slider styling) */
#selectedVoice[size]::-webkit-slider-thumb,
#selectedVoice[size]::-moz-range-thumb {
    display: none !important;
}

.setting-item select:hover {
    border-color: var(--primary-color);
}

.setting-item select:focus {
    border-color: var(--secondary-color);
}

.setting-item span {
    min-width: 50px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.setting-item input[type="time"],
.setting-item input[type="number"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.setting-item input[type="time"]:hover,
.setting-item input[type="number"]:hover {
    border-color: var(--primary-color);
}

.setting-item input[type="time"]:focus,
.setting-item input[type="number"]:focus {
    border-color: var(--secondary-color);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Layout Customization Modal */
.layout-modal-content {
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.layout-customization-info {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--primary-color);
}

.layout-customization-info p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.layout-widgets-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 200px;
    width: 100%;
}

.layout-widgets-list > * {
    display: block;
}

.layout-widget-item {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary, #1e1e1e) !important;
    border: 2px solid var(--border-color, #333) !important;
    border-radius: var(--border-radius, 8px);
    cursor: move;
    transition: var(--transition, all 0.3s ease);
    -webkit-user-select: none;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

.layout-widget-item:hover {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
    transform: translateX(5px);
}

.layout-widget-item.dragging {
    opacity: 0.5;
    border-color: var(--secondary-color);
    background: rgba(74, 144, 226, 0.2);
}

.layout-widget-item.drag-over {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.15);
}

.layout-widget-drag-handle {
    font-size: 1.5rem;
    color: var(--text-light, #999) !important;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.layout-widget-item.dragging .layout-widget-drag-handle {
    cursor: grabbing;
}

.layout-widget-info {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.layout-widget-name {
    font-weight: 600;
    color: var(--text-color, #ffffff) !important;
    font-size: 1rem;
    display: block;
}

.layout-widget-type {
    font-size: 0.85rem;
    color: var(--text-light, #999) !important;
    display: block;
}

.layout-widget-size {
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
}

.size-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.size-badge.size-small {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.size-badge.size-medium {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.size-badge.size-large {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.size-badge.size-extra-large {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.no-widgets-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-style: italic;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay-content {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-overlay-content h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.login-overlay-content p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.login-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.login-back-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-nav-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.back-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .widgets-sidebar {
        width: 100%;
        max-height: 300px;
    }

    .widgets-sidebar.collapsed {
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        overflow: hidden;
        border-right: none;
    }

    .chat-section {
        height: 300px;
        min-height: 300px;
    }

    .widgets-grid {
        grid-template-columns: 1fr;
    }
    
    /* Widget sizes already handled above in @media (max-width: 768px) */

    .header-left {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        flex-wrap: wrap;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--card-background);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Log Viewer Styles */
.log-viewer {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 600px;
    max-width: 90vw;
    height: 500px;
    max-height: 80vh;
    background-color: var(--card-background);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 10000;
    transition: transform 0.3s ease;
}

.log-viewer.active {
    display: flex;
}

.log-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: rgba(41, 128, 185, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.log-viewer-header h3 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.log-viewer-controls {
    display: flex;
    gap: 0.5rem;
}

.log-btn {
    padding: 0.4rem 0.8rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.log-btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.log-btn:last-child {
    background-color: var(--accent-color);
    font-size: 1.2rem;
    padding: 0.2rem 0.6rem;
}

.log-btn:last-child:hover {
    background-color: #c0392b;
}

.log-viewer-filters {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background-color: rgba(26, 26, 26, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.log-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
}

.log-filter input[type="checkbox"] {
    cursor: pointer;
}

.log-viewer-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

.log-entry {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    border-left: 3px solid transparent;
    word-wrap: break-word;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.log-entry.error {
    background-color: rgba(231, 76, 60, 0.15);
    border-left-color: #e74c3c;
    color: #ff6b6b;
}

.log-entry.warn {
    background-color: rgba(241, 196, 15, 0.15);
    border-left-color: #f1c40f;
    color: #ffd93d;
}

.log-entry.info {
    background-color: rgba(52, 152, 219, 0.15);
    border-left-color: #3498db;
    color: #74b9ff;
}

.log-entry.debug {
    background-color: rgba(149, 165, 166, 0.15);
    border-left-color: #95a5a6;
    color: #b2bec3;
}

.log-time {
    color: var(--text-light);
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.log-message {
    flex: 1;
    color: inherit;
}

.log-message pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive log viewer */
@media (max-width: 768px) {
    .log-viewer {
        width: 100vw;
        max-width: 100vw;
        height: 60vh;
        border-radius: 0;
    }
}

/* Lesson Plan Widget Styles */
.lesson-plan {
    padding: 1rem;
}

/* Preview/Teaser styling for guest users - Generic for all widget types */
.widget-preview {
    position: relative;
}

.widget-preview-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.lesson-plan-preview {
    position: relative;
}

.workout-plan-preview {
    position: relative;
}

.preview-banner-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.preview-message {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.preview-message strong {
    font-weight: 600;
}

/* Preview content styling - applies to all preview widgets */
.lesson-plan-preview .lesson-section,
.workout-plan-preview .workout-exercise {
    opacity: 0.7;
    position: relative;
}

.lesson-plan-preview .lesson-section::after,
.workout-plan-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.03) 10px,
        rgba(0, 0, 0, 0.03) 20px
    );
    pointer-events: none;
    border-radius: var(--border-radius);
}

.lesson-plan-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.lesson-plan-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.lesson-subject,
.lesson-grade {
    font-size: 0.875rem;
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
}

.lesson-section {
    margin-bottom: 1.25rem;
}

.lesson-section h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.lesson-section p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Worksheet-specific styling */
.worksheet-section {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.worksheet-content {
    color: var(--text-color);
    line-height: 1.8;
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.worksheet-content p {
    margin: 0.75rem 0;
    color: var(--text-color);
}

.worksheet-content strong,
.worksheet-content b {
    color: var(--primary-color);
    font-weight: 600;
}

/* Rubric-specific styling */
.rubric-section {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.rubric-content {
    color: var(--text-color);
    line-height: 1.8;
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.rubric-content p {
    margin: 0.75rem 0;
    color: var(--text-color);
}

.rubric-item {
    margin: 0.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
    background-color: rgba(74, 144, 226, 0.05);
    padding: 0.75rem;
    border-radius: 4px;
}

.rubric-content strong,
.rubric-content b {
    color: var(--primary-color);
    font-weight: 600;
}

.lesson-objectives,
.lesson-activities,
.lesson-materials {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.lesson-objectives li,
.lesson-activities li,
.lesson-materials li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
}

.lesson-objectives li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.lesson-activities li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.lesson-materials li::before {
    content: "📋";
    position: absolute;
    left: 0;
}

/* Workout Plan Widget Styles */
.workout-plan {
    padding: 1rem;
}

.workout-plan-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.workout-exercises {
    list-style: none;
    padding-left: 0;
}

.workout-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.workout-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.workout-exercise {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.exercise-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.exercise-sets-reps {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: var(--border-radius);
}

.exercise-description {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

.workout-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Health & Nutrition Widget - Day-by-Day Meal Plans */
.health-day-plan {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.health-day-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.health-meal-item {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    line-height: 1.6;
}

.health-meal-item strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.meal-calories {
    color: var(--text-light);
    font-size: 0.9em;
    font-weight: normal;
}

.health-meals {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.health-meals li:last-child {
    margin-bottom: 0;
}

