:root {
    --primary-color: 59 130 246; /* Blue-500 */
    --secondary-color: 156 163 175; /* Gray-400 */
    --success-color: 99 102 241; /* Indigo-500 */
    --danger-color: 248 113 113; /* Red-400 */
    --warning-color: 139 92 246; /* Violet-500 */
    --info-color: 96 165 250; /* Blue-400 */
    --light-color: 254 239 242; /* Very light pink */
    --dark-color: 68 68 68; /* Dark gray #444 */
    --background: 255 238 242; /* Soft pink #ffeef2 */
    --text-muted: 107 114 128; /* #6B7280 */
    --accent-lavender: 244 240 250; /* Lavender #f4f0fa */
}

body {
    background-color: hsl(var(--background));
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: hsl(var(--dark-color));
}

/* Navigation Styles */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-light .navbar-nav .nav-link {
    color: hsl(var(--dark-color));
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
    background-color: hsl(var(--primary-color) / 0.1);
    color: hsl(var(--primary-color));
}

/* Card Animations */
.action-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.action-card:hover .card-icon {
    opacity: 1;
}

/* Hero Section */
.hero-section {
    padding: 3rem 0;
}

.welcome-message {
    border-left: 4px solid hsl(var(--primary-color));
    background: linear-gradient(135deg, hsl(var(--accent-lavender)), white);
    box-shadow: 0 2px 10px rgba(139, 69, 188, 0.1);
}

/* Form Styles */
.form-control {
    border: 2px solid hsl(var(--secondary-color) / 0.3);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: hsl(var(--primary-color));
    box-shadow: 0 0 0 0.2rem hsl(var(--primary-color) / 0.25);
}

/* Mood Rating Buttons */
.mood-rating .btn-group {
    width: 100%;
}

.mood-rating .btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
}

.mood-rating .btn-check:checked + .btn {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Diary Entries */
.entry-item {
    background: white;
    border-left: 4px solid hsl(var(--primary-color));
    transition: box-shadow 0.3s ease;
}

.entry-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mood-display .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* Audio Player Styles */
.audio-player {
    padding: 1rem;
    background: hsl(var(--accent-lavender));
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(139, 69, 188, 0.15);
}

audio {
    border-radius: 0.5rem;
}

/* Breathing Animation */
.breathing-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.breath-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, hsl(var(--primary-color)), hsl(var(--info-color)));
    border-radius: 50%;
    animation: breathe 4s ease-in-out infinite;
}

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

/* Gratitude Animation */
.gratitude-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.gratitude-heart {
    font-size: 3rem;
    color: hsl(var(--danger-color));
    animation: heartbeat 2s ease-in-out infinite;
}

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

/* Cloud Animation */
.visualization-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.cloud-animation i {
    font-size: 3rem;
    color: hsl(var(--info-color));
    animation: float 3s ease-in-out infinite;
}

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

/* Emergency Contact Styles */
.emergency-contact {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid hsl(var(--danger-color) / 0.2);
    height: 100%;
    box-shadow: 0 2px 8px rgba(139, 69, 188, 0.1);
}

.contact-item {
    padding: 1rem;
    background: hsl(var(--light-color));
    border-radius: 0.5rem;
    border-left: 4px solid hsl(var(--danger-color));
}

/* Resource Items */
.resource-item {
    background: white;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid hsl(var(--secondary-color) / 0.2);
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease;
}

.resource-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Result Score Display */
.result-score {
    background: linear-gradient(135deg, hsl(var(--primary-color) / 0.1), hsl(var(--info-color) / 0.1));
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid hsl(var(--primary-color) / 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .display-4, .display-5 {
        font-size: 2rem;
    }
    
    .mood-rating .btn-group {
        flex-direction: column;
    }
    
    .mood-rating .btn {
        margin: 0.25rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, .alert {
        display: none;
    }
    
    .card {
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid hsl(var(--primary-color));
    outline-offset: 2px;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Bootstrap Override Styles - Force blue colors */
.text-primary, h1.text-primary, h2.text-primary, h3.text-primary, h4.text-primary, h5.text-primary, h6.text-primary {
    color: rgb(59, 130, 246) !important;
}

.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: rgb(59, 130, 246) !important;
    border-color: rgb(59, 130, 246) !important;
}

.btn-success, .btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: rgb(99, 102, 241) !important;
    border-color: rgb(99, 102, 241) !important;
}

.btn-warning, .btn-warning:hover, .btn-warning:focus, .btn-warning:active {
    background-color: rgb(139, 92, 246) !important;
    border-color: rgb(139, 92, 246) !important;
    color: white !important;
}

.btn-info, .btn-info:hover, .btn-info:focus, .btn-info:active {
    background-color: rgb(96, 165, 250) !important;
    border-color: rgb(96, 165, 250) !important;
}

.bg-primary, .card-header.bg-primary {
    background-color: rgb(59, 130, 246) !important;
}

.bg-success, .card-header.bg-success {
    background-color: rgb(99, 102, 241) !important;
}

.bg-warning, .card-header.bg-warning {
    background-color: rgb(139, 92, 246) !important;
}

.bg-info, .card-header.bg-info {
    background-color: rgb(96, 165, 250) !important;
}

/* Navbar brand color override */
.navbar-brand .text-primary {
    color: rgb(59, 130, 246) !important;
}

/* Card title colors */
.card-title, .card-title.text-primary {
    color: rgb(59, 130, 246) !important;
}

/* Display text colors */
.display-4, .display-5 {
    color: rgb(59, 130, 246) !important;
}

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

::-webkit-scrollbar-track {
    background: hsl(var(--light-color));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--primary-color));
}
