/* assets/css/style.css - Main stylesheet for Vitomon.com */

:root {
    --primary-color: #34a853;
    --secondary-color: #2ecc71;
    --accent-color: #5cbd6f;
    --warning-color: #D69E2E;
    --danger-color: #E53E3E;
    --light-bg: #f0f9f4;
    --dark-bg: #1a202c;
    --text-color: #2D3748;
    --text-muted: #718096;
    --border-color: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Override Bootstrap primary color to green */
.text-primary {
    color: #34a853 !important;
}

.bg-primary {
    background-color: #34a853 !important;
}

.btn-primary {
    background: #34a853 !important;
    border-color: #34a853 !important;
    color: white !important;
}

.btn-primary:hover {
    background: #2d8e47 !important;
    border-color: #2d8e47 !important;
}

.btn-outline-primary {
    color: #34a853 !important;
    border-color: #34a853 !important;
}

.btn-outline-primary:hover {
    background: #34a853 !important;
    border-color: #34a853 !important;
    color: white !important;
}

.badge-custom {
    background: linear-gradient(45deg, #34a853, #5cbd6f) !important;
}

.text-info {
    color: #34a853 !important;
}

.btn-outline-info {
    color: #34a853 !important;
    border-color: #34a853 !important;
}

.btn-outline-info:hover {
    background: #34a853 !important;
    border-color: #34a853 !important;
    color: white !important;
}

body {
    font-family: 'Arial', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 76px; /* Account for fixed navbar */
}

.main-content {
    min-height: calc(100vh - 200px);
}

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

/* Enhanced nav-link visibility */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transform: translateY(-1px);
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-weight: 600;
}

/* User contribution indicators for Tips, Recipes, Relax, Challenges */
.nav-link .contribution-count {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 4px;
    font-weight: bold;
}

/* Cards */
.card {
    border: none;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.15);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #34a853, #5cbd6f);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4xKSIgZmlsbC1ydWxlPSJub256ZXJvIj48Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIyIi8+PC9nPjwvZz48L3N2Zz4=');
    opacity: 0.1;
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
    border-radius: 15px;
    background: white;
}

.feature-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Content Cards */
.content-card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.content-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.content-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.rating {
    color: #F6AD55;
}

/* User Profile */
.profile-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.badge-custom {
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    color: white;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Forms */
.form-floating > label {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: #34a853;
    box-shadow: 0 0 0 0.2rem rgba(52, 168, 83, 0.25);
}

.btn-primary {
    background: #34a853 !important;
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.4);
    background: #2d8e47 !important;
}

.btn-success {
    background: linear-gradient(135deg, #34a853, #5cbd6f);
    border: none;
    font-weight: 600;
}

/* AI Chat Interface */
.chat-container {
    height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    background: var(--light-bg);
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 12px;
    max-width: 80%;
}

.chat-message.user {
    background: #34a853;
    color: white;
    margin-left: auto;
    text-align: right;
}

.chat-message.ai {
    background: white;
    border: 1px solid var(--border-color);
    margin-right: auto;
}

/* Challenge Cards */
.challenge-card {
    border-left: 4px solid var(--secondary-color);
    background: linear-gradient(135deg, #F0FFF4, #E6FFFA);
}

.progress-ring {
    width: 60px;
    height: 60px;
}

/* Video Embeds */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Loading Spinner */
.spinner-vitomon {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .chat-message {
        max-width: 95%;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1A202C;
        --text-color: #F7FAFC;
        --text-muted: #A0AEC0;
        --border-color: #4A5568;
    }
    
    .card {
        background: #2D3748;
        color: var(--text-color);
    }
    
    .feature-card {
        background: #2D3748;
        color: var(--text-color);
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #34a853, #5cbd6f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #34a853, #5cbd6f) 1;
    border-radius: 8px;
}
