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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

#app {
    min-height: 100vh;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 150px;
    height: auto;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
}

.toggle-password:hover {
    color: #667eea;
}

.form-options {
    margin-bottom: 20px;
    text-align: right;
}

.toggle-show {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
}

.toggle-show:hover {
    text-decoration: underline;
}

.checkbox {
    display: flex;
    align-items: center;
}

.checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    width: auto;
}

.auth-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.auth-button:hover {
    transform: translateY(-2px);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Image Slots */
.image-slots {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.slot {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    border: 2px dashed rgba(255,255,255,0.5);
}

/* Loading Page */
.loading-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.loading-logo {
    margin-bottom: 30px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main App */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

/* Navigation Bar */
.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-logo {
    height: 70px;
    width: auto;
}

.nav-left a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-left a.active {
    color: #667eea;
}

.nav-left a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

/* Navigation Bar Right Section */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Theme Dropdown - Positioned to the left of logout */
.theme-dropdown {
    position: relative;
    display: inline-block;
    order: -1; /* This ensures theme dropdown appears before logout */
}

.theme-toggle {
    background: none;
    border: 2px solid #e0e0e0;
    color: #666;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    min-width: 100px;
    justify-content: space-between;
}

.theme-toggle:hover {
    border-color: #667eea;
    color: #667eea;
}

.theme-toggle i:first-child {
    font-size: 16px;
}

.theme-toggle span {
    flex: 1;
    text-align: left;
}

.theme-toggle i:last-child {
    font-size: 12px;
    transition: transform 0.3s;
}

.theme-toggle i:last-child.rotate {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 100px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-item {
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item.active {
    background: #667eea;
    color: white;
}

.dropdown-item i {
    width: 20px;
}

.logout-button {
    background: none;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-button:hover {
    background: #ff6b6b;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    width: 100%;
}

.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
}

.intro-text {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

/* Dashboard */
.dashboard {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.dashboard p i {
    margin-right: 5px;
}

.dashboard h2 {
    text-align: left;
    margin-bottom: 20px;
}

.mood-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mood-entry {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mood-entry:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, #f5f7ff 0%, #ede7f6 100%);
}

.mood-time i {
    margin-right: 8px;
    opacity: 0.6;
}

.mood-time {
    min-width: 120px;
    color: #555;
    font-size: 14px;
}

.mood-status {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.mood-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.mood-confidence {
    color: #28a745;
    font-weight: 500;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* Music Recommendation Page */
.page-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.modals-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.modal-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.modal-section h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}

.record-button:hover:not(:disabled) {
    transform: scale(1.05);
}

.record-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dc3545;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

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

.analysis-result {
    text-align: center;
}

.analysis-result p {
    margin: 5px 0;
    color: #666;
}

.analysis-result strong {
    color: #28a745;
    font-size: 18px;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    resize: vertical;
    margin-bottom: 10px;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.analyze-button {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.analyze-button:hover:not(:disabled) {
    background: #5a6fd8;
}

.analyze-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Fusion Result */
.fusion-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    text-align: center;
    margin-bottom: 40px;
}

.fusion-result h2 {
    color: white;
    margin-bottom: 20px;
}

.mood-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.final-mood {
    font-size: 36px;
    font-weight: 700;
}

.fusion-confidence {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
}

.fusion-description {
    font-size: 16px;
    opacity: 0.9;
}

/* Music Recommendations */
.recommendations h2 {
    margin-bottom: 20px;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.music-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.music-card:hover {
    transform: translateY(-5px);
}

.album-art {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.track-info {
    padding: 15px;
}

.track-info h4 {
    color: #333;
    margin-bottom: 5px;
}

.track-info p {
    color: #666;
    font-size: 14px;
}

.play-button {
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    border-top: 1px solid #e0e0e0;
    color: #667eea;
    cursor: pointer;
    transition: background 0.3s;
}

.play-button:hover {
    background: #f8f9fa;
}

/* About Page */
.about-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    text-align: left;
    margin-bottom: 20px;
    color: #333;
}

.about-section p {
    color: #666;
    line-height: 1.8;
    font-size: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature {
    text-align: center;
    padding: 20px;
}

.feature i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.feature h3 {
    margin-bottom: 10px;
    color: #333;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: white;
    text-align: center;
    padding: 20px;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay .modal-content {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease;
    overflow: hidden;
    text-align: center;
}

.modal-header {
    padding: 120px 30px 10px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.modal-header h3 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.modal-close {
    position: absolute;
    top: 0px;
    right: 0px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #ff6b6b;
}

.modal-body {
    padding: 20px 30px 30px 30px;
}

.modal-body p {
    color: #666;
    font-size: 20px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

.modal-footer {
    padding: 0 30px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
    background: transparent;
}

.modal-button {
    padding: 13px 20px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    width: 100%;
    letter-spacing: 0.5px;
    text-align: center;
}

.modal-button.cancel {
    background: #f0f0f0;
    color: #666;
    border: 2px solid #e0e0e0;
}

.modal-button.cancel:hover {
    background: #e0e0e0;
    border-color: #d0d0d0;
    transform: translateY(-2px);
}

.modal-button.confirm {
    background: #ff6b6b;
    color: white;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.modal-button.confirm:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(255, 107, 107, 0.4);
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

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

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== DARK MODE STYLES ========== */

/* Dark Mode for App Container (Home, Music, About pages) */
.app-container.dark-mode {
    background: #1a1a1a;
}

.app-container.dark-mode .navbar {
    background: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.app-container.dark-mode .nav-left a {
    color: #e0e0e0;
}

.app-container.dark-mode .nav-left a.active {
    color: #667eea;
}

.app-container.dark-mode .nav-left a.active::after {
    background: #667eea;
}

.app-container.dark-mode .theme-toggle {
    border-color: #404040;
    color: #e0e0e0;
}

.app-container.dark-mode .theme-toggle:hover {
    border-color: #667eea;
    color: #667eea;
}

.app-container.dark-mode .dropdown-menu {
    background: #2d2d2d;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.app-container.dark-mode .dropdown-item {
    color: #e0e0e0;
}

.app-container.dark-mode .dropdown-item:hover {
    background: #404040;
}

.app-container.dark-mode .dropdown-item.active {
    background: #667eea;
    color: white;
}

.app-container.dark-mode .logout-button {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.app-container.dark-mode .logout-button:hover {
    background: #ff6b6b;
    color: white;
}

.app-container.dark-mode .main-content {
    background: #1a1a1a;
}

.app-container.dark-mode .page-header h1 {
    color: #ffffff;
}

.app-container.dark-mode .intro-text,
.app-container.dark-mode .page-subtitle {
    color: #b0b0b0;
}

.app-container.dark-mode .dashboard {
    background: #2d2d2d;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.app-container.dark-mode .dashboard h2 {
    color: #ffffff;
}

.app-container.dark-mode .mood-entry {
    background: #404040;
}

.app-container.dark-mode .mood-time {
    color: #b0b0b0;
}

.app-container.dark-mode .mood-label {
    color: #ffffff;
}

.app-container.dark-mode .mood-confidence {
    color: #4caf50;
}

.app-container.dark-mode .no-data {
    color: #808080;
}

.app-container.dark-mode .modal-section {
    background: #2d2d2d;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.app-container.dark-mode .modal-section h3 {
    color: #ffffff;
}

.app-container.dark-mode .modal-section h3 i {
    color: #667eea;
}

.app-container.dark-mode .analysis-result p {
    color: #b0b0b0;
}

.app-container.dark-mode .analysis-result strong {
    color: #4caf50;
}

.app-container.dark-mode textarea {
    background: #404040;
    border-color: #404040;
    color: #e0e0e0;
}

.app-container.dark-mode textarea:focus {
    border-color: #667eea;
}

.app-container.dark-mode textarea::placeholder {
    color: #808080;
}

.app-container.dark-mode .fusion-result {
    background: linear-gradient(135deg, #4a3f7a 0%, #5a3d7a 100%);
}

.app-container.dark-mode .fusion-result h2 {
    color: white;
}

.app-container.dark-mode .fusion-result .final-mood {
    color: white;
}

.app-container.dark-mode .fusion-result .fusion-confidence {
    background: rgba(255,255,255,0.2);
    color: white;
}

.app-container.dark-mode .fusion-result .fusion-description {
    color: rgba(255,255,255,0.9);
}

.app-container.dark-mode .recommendations h2 {
    color: #ffffff;
}

.app-container.dark-mode .music-card {
    background: #2d2d2d;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.app-container.dark-mode .track-info h4 {
    color: #ffffff;
}

.app-container.dark-mode .track-info p {
    color: #b0b0b0;
}

.app-container.dark-mode .play-button {
    border-top-color: #404040;
    color: #667eea;
}

.app-container.dark-mode .play-button:hover {
    background: #404040;
}

.app-container.dark-mode .about-content {
    background: #2d2d2d;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.app-container.dark-mode .about-section h2 {
    color: #ffffff;
}

.app-container.dark-mode .about-section p {
    color: #b0b0b0;
}

.app-container.dark-mode .feature h3 {
    color: #ffffff;
}

.app-container.dark-mode .feature p {
    color: #b0b0b0;
}

.app-container.dark-mode .feature i {
    color: #667eea;
}

.app-container.dark-mode .footer {
    background: #2d2d2d;
    color: #b0b0b0;
    border-top-color: #404040;
}

/* Dark mode modal styles for app container */
.app-container.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.app-container.dark-mode .modal-overlay .modal-content {
    background: #2d2d2d;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.app-container.dark-mode .modal-header h3 {
    color: #ffffff;
}

.app-container.dark-mode .modal-close {
    color: #b0b0b0;
}

.app-container.dark-mode .modal-close:hover {
    background: #404040;
    color: #ff6b6b;
}

.app-container.dark-mode .modal-body p {
    color: #e0e0e0;
}

.app-container.dark-mode .modal-footer {
    border-top-color: #404040;
    background: #252525;
}

.app-container.dark-mode .modal-button.cancel {
    background: #404040;
    border-color: #505050;
    color: #e0e0e0;
}

.app-container.dark-mode .modal-button.cancel:hover {
    background: #505050;
    border-color: #606060;
}

/* Dark mode modal styles for auth pages */
body.dark-mode-auth .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

body.dark-mode-auth .modal-overlay .modal-content {
    background: #2d2d2d;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

body.dark-mode-auth .modal-header h3 {
    color: #ffffff;
}

body.dark-mode-auth .modal-close {
    color: #b0b0b0;
}

body.dark-mode-auth .modal-close:hover {
    background: #404040;
    color: #ff6b6b;
}

body.dark-mode-auth .modal-body p {
    color: #e0e0e0;
}

body.dark-mode-auth .modal-footer {
    border-top-color: #404040;
    background: #252525;
}

body.dark-mode-auth .modal-button.cancel {
    background: #404040;
    border-color: #505050;
    color: #e0e0e0;
}

body.dark-mode-auth .modal-button.cancel:hover {
    background: #505050;
    border-color: #606060;
}


/* ========== LARGER CAMERA MODAL ========== */
.camera-modal {
    max-width: 720px !important;
    width: 95% !important;
}

.camera-modal .modal-body {
    padding: 20px !important;
}

.camera-preview {
    width: 100% !important;
    min-height: 400px !important;
    max-height: 500px !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    background: #1a1a1a !important;
}

.camera-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.camera-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent) !important;
    padding: 30px 20px 20px !important;
}

.camera-overlay .countdown {
    font-size: 64px !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
    margin-bottom: 15px !important;
}

.camera-overlay .detection-info p {
    font-size: 18px !important;
    margin: 5px 0 !important;
}

.camera-overlay .detected-mood {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #FFD700 !important;
}

/* Hide confidence elements in camera modal */
.camera-modal .confidence-bar,
.camera-modal .confidence-text,
.camera-modal p:has(.confidence-text) {
    display: none !important;
}

.countdown {
    font-size: 48px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.detection-info {
    text-align: center;
}

/* Now Playing Bar */
.now-playing-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.now-playing-info i {
    font-size: 18px;
}

.now-playing-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stop-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.stop-button:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Dark mode now playing bar */
.app-container.dark-mode .now-playing-bar {
    background: linear-gradient(135deg, #4a3f7a 0%, #5a3d7a 100%);
}

/* Embedded Music Player - No External Links */
.music-card {
    position: relative;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.music-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    color: white;
    font-size: 24px;
}

.track-controls {
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.play-button {
    background: none;
    border: none;
    color: #667eea;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.play-button:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.track-progress {
    height: 3px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #667eea;
    animation: progress 30s linear forwards;
}

@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}

/* Now Playing Bar - Persistent */
.now-playing-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.now-playing-info i {
    font-size: 18px;
    animation: pulse 1s ease-in-out infinite;
}

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

.now-playing-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stop-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.stop-button:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.volume-control {
    position: relative;
}

.volume-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider {
    position: absolute;
    bottom: 45px;
    right: 0;
    background: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.volume-slider input {
    width: 120px;
}

/* Dark mode */
.app-container.dark-mode .track-controls {
    border-top-color: #404040;
}

.app-container.dark-mode .track-progress {
    background: #404040;
}

.app-container.dark-mode .now-playing-bar {
    background: linear-gradient(135deg, #4a3f7a 0%, #5a3d7a 100%);
}

.app-container.dark-mode .volume-slider {
    background: #2d2d2d;
}

/* Footer adjustment */
.footer {
    margin-bottom: 60px;
}

/* Adjust footer margin to accommodate now playing bar */
.footer {
    margin-bottom: 60px;
}

.confidence-bar {
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Voice Modal - Show final result */
.voice-modal .voice-container {
    text-align: center;
}

.voice-modal .final-result {
    text-align: center;
    padding: 20px;
}

.voice-modal .final-mood-display {
    font-size: 36px;
    font-weight: 700;
    margin: 20px 0;
}

.voice-modal .mic-icon {
    font-size: 80px;
    color: #667eea;
    margin-bottom: 20px;
}

.voice-modal .mic-icon i {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Volume Control */
.volume-control {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
}

.volume-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.volume-slider {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.volume-slider input {
    width: 150px;
}

/* Dark mode volume slider */
.app-container.dark-mode .volume-slider {
    background: #2d2d2d;
}

.app-container.dark-mode .volume-slider input {
    background: #404040;
}



/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-left {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .theme-dropdown {
        order: 0; /* Reset order on mobile */
    }
    
    .modals-container {
        grid-template-columns: 1fr;
    }
    
    .mood-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mood-time {
        min-width: auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .mood-display {
        flex-direction: column;
        gap: 10px;
    }
}