/* ===== GENERAL STYLES ===== */
:root {
    --primary-color: #6200ee;
    --primary-light: #bb86fc;
    --secondary-color: #03dac6;
    --background-light: #f5f5f5;
    --background-dark: #121212;
    --text-light: #ffffff;
    --text-dark: #333333;
    --card-light: rgba(255, 255, 255, 0.8);
    --card-dark: rgba(30, 30, 30, 0.8);
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.3);
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --info: #2196f3;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-dark);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.dark-theme {
    background-color: var(--background-dark);
    color: var(--text-light);
}

.dashboard-page {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.highlight {
    color: var(--primary-color);
}

.btn {
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition);
}

.glass-card {
    background-color: var(--card-light);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

.dark-theme .glass-card {
    background-color: var(--card-dark);
    box-shadow: var(--shadow-dark);
}

/* ===== TOP NAVIGATION ===== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.dark-theme .top-nav {
    background-color: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    background-color: rgba(98, 0, 238, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.dark-theme .search-bar {
    background-color: #2a2a2a;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    width: 200px;
    color: inherit;
}

.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    transition: var(--transition);
}

.search-bar button:hover {
    color: var(--primary-color);
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-theme .theme-toggle {
    color: #ffb74d;
}

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

.user-profile {
    position: relative;
    cursor: pointer;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    width: 200px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 10;
}

.dark-theme .user-dropdown {
    background-color: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.user-profile:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.user-dropdown a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

.dark-theme .user-dropdown a:hover {
    background-color: #333;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    display: flex;
    flex: 1;
    padding: 1.5rem;
    gap: 1.5rem;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-shrink: 0;
}

.sidebar-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    padding: 1.5rem;
    transition: var(--transition);
}

.dark-theme .sidebar-section {
    background-color: #1e1e1e;
    box-shadow: var(--shadow-dark);
}

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

.mood-chart {
    margin-bottom: 1rem;
    height: 120px;
}

.mood-summary {
    display: flex;
    justify-content: space-between;
}

.summary-item {
    text-align: center;
}

.summary-label {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.3rem;
}

.dark-theme .summary-label {
    color: #aaa;
}

.summary-value {
    font-weight: 600;
}

.content-stats {
    display: flex;
    justify-content: space-between;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    background-color: rgba(98, 0, 238, 0.1);
    padding: 0.7rem;
    border-radius: 50%;
}

.stat-info span {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
}

.stat-info p {
    font-size: 0.8rem;
    color: #777;
}

.dark-theme .stat-info p {
    color: #aaa;
}

.favorites-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.dark-theme .favorites-list li {
    border-bottom: 1px solid #333;
}

.favorites-list li:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.favorites-list img {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
}

/* ===== CONTENT AREA ===== */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    padding: 1.5rem;
    transition: var(--transition);
}

.dark-theme .welcome-section {
    background-color: #1e1e1e;
    box-shadow: var(--shadow-dark);
}

.welcome-message h2 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.welcome-message .user-name {
    color: var(--primary-color);
}

.date-info {
    text-align: right;
}

.date {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.time {
    color: #777;
}

.dark-theme .time {
    color: #aaa;
}

/* ===== CHAT CONTAINER ===== */
.chat-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.chat-box::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

.dark-theme .chat-box::-webkit-scrollbar-thumb {
    background-color: #555;
}

.message {
    display: flex;
    gap: 0.8rem;
    max-width: 80%;
}

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

.message-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    background-color: #f5f5f5;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dark-theme .message-content {
    background-color: #2a2a2a;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.message.user .message-content {
    background-color: var(--primary-light);
    color: var(--text-light);
    border-radius: 18px;
    border-top-right-radius: 4px;
}

.mood-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mood-btn {
    background-color: #f5f5f5;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.dark-theme .mood-btn {
    background-color: #2a2a2a;
}

.mood-btn:hover {
    background-color: #e0e0e0;
}

.dark-theme .mood-btn:hover {
    background-color: #333;
}

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

.input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f5f5f5;
    border-radius: 50px;
    padding: 0.5rem;
    transition: var(--transition);
}

.dark-theme .input-container {
    background-color: #2a2a2a;
}

.input-container input {
    flex: 1;
    border: none;
    background: none;
    padding: 0.5rem;
    outline: none;
    color: inherit;
}

.input-container button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
    color: #777;
    transition: var(--transition);
}

.dark-theme .input-container button {
    color: #aaa;
}

.input-container button:hover {
    color: var(--primary-color);
}

.btn-reset, .btn-voice {
    background-color: #eee;
    border-radius: 50%;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-theme .btn-reset, .dark-theme .btn-voice {
    background-color: #333;
}

#sendBtn {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sendBtn:hover {
    background-color: var(--primary-light);
    color: white;
}

/* ===== RECOMMENDATIONS ===== */
.recommendations-container {
    padding: 1.5rem;
}

.recommendations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.btn-refresh {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #777;
    transition: var(--transition);
}

.dark-theme .btn-refresh {
    color: #aaa;
}

.btn-refresh:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.view-selector {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 0.3rem;
}

.dark-theme .view-selector {
    background-color: #2a2a2a;
}

.view-btn {
    border: none;
    background: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn.active {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-theme .view-btn.active {
    background-color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.dark-theme .tabs {
    border-bottom: 1px solid #333;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    border: none;
    background: none;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    color: #777;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.dark-theme .tab-btn {
    color: #aaa;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.tab-btn i {
    margin-right: 0.5rem;
}

.recommendations {
    min-height: 200px;
}

.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.dark-theme .content-card {
    background-color: #2a2a2a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.grid-view .content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.dark-theme .grid-view .content-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
}

.content-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.list-view .content-thumbnail {
    height: 80px;
    width: 120px;
    padding-bottom: 0;
    flex-shrink: 0;
}

.content-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-view .content-thumbnail img {
    position: static;
}

.content-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.content-info {
    padding: 1rem;
}

.list-view .content-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #777;
}

.dark-theme .content-meta {
    color: #aaa;
}

.content-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.content-rating i {
    color: #ffc107;
}

.content-duration {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.content-actions {
    margin-top: 0.8rem;
    display: flex;
    justify-content: space-between;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    transition: var(--transition);
    font-size: 0.9rem;
    padding: 0.3rem;
}

.dark-theme .action-btn {
    color: #aaa;
}

.action-btn:hover {
    color: var(--primary-color);
}

.action-btn.favorite.active {
    color: #f44336;
}

.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: #777;
}

.dark-theme .loading-placeholder {
    color: #aaa;
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: dotPulse 1.5s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.3s;
}

.dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ===== FOOTER ===== */
.main-footer {
    background-color: #f9f9f9;
    padding: 2rem;
    margin-top: auto;
    transition: var(--transition);
}

.dark-theme .main-footer {
    background-color: #1a1a1a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 1rem;
    color: #777;
    max-width: 300px;
}

.dark-theme .footer-section p {
    color: #aaa;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #777;
    font-size: 1.2rem;
    transition: var(--transition);
}

.dark-theme .social-links a {
    color: #aaa;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #777;
    transition: var(--transition);
}

.dark-theme .footer-section ul li a {
    color: #aaa;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    color: #777;
}

.dark-theme .footer-bottom {
    border-top: 1px solid #333;
    color: #aaa;
}

/* ===== NOTIFICATION ===== */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.notification {
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: white;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards, fadeOut 0.3s 3.7s forwards;
    max-width: 350px;
}

.dark-theme .notification {
    background-color: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.warning {
    border-left: 4px solid var(--warning);
}

.notification.error {
    border-left: 4px solid var(--error);
}

.notification.info {
    border-left: 4px solid var(--info);
}

.notification-icon {
    font-size: 1.2rem;
}

.notification.success .notification-icon {
    color: var(--success);
}

.notification.warning .notification-icon {
    color: var(--warning);
}

.notification.error .notification-icon {
    color: var(--error);
}

.notification.info .notification-icon {
    color: var(--info);
}

.notification-message {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #aaa;
    padding: 5px;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--error);
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(120%);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }
    
    .sidebar::-webkit-scrollbar {
        display: none;
    }
    
    .sidebar-section {
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 1rem;
    }
    
    .nav-brand h1 {
        font-size: 1.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .search-bar {
        display: none;
    }
    
    .main-container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .sidebar {
        flex-direction: column;
    }
    
    .sidebar-section {
        min-width: 100%;
    }
    
    .welcome-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .date-info {
        text-align: left;
    }
    
    .tabs {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.8rem 1rem;
    }
    
    .grid-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-section {
        min-width: 100%;
    }
}