:root {
    /* ====== Color Scheme ====== */
    --primary-color: #ffc107; /* Yellow - from logo */
    --primary-dark: #e6a800;
    --primary-light: #ffdb77;
    --secondary-color: #6c757d; /* Gray */
    --accent-color: #7d57c9; /* Light purple */
    
    --dark-color: #212529; /* Dark gray - almost black */
    --light-color: #f8f9fa; /* Light gray - almost white */
    
    --success-color: #28a745; /* Green */
    --info-color: #17a2b8;    /* Teal */
    --warning-color: #ffc107; /* Yellow - same as primary */
    --danger-color: #dc3545;  /* Red */
    
    /* ====== Background Colors ====== */
    --body-bg: #f5f5f5; /* Light gray background */
    --card-bg: #ffffff; /* Purple card background */

    /* ====== Fonts ====== */
    --main-font: "Comfortaa", sans-serif;
    
    /* ====== Shadows ====== */
    --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    --btn-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    
    /* ====== Border Radius ====== */
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-pill: 50rem;
}

body {
    font-family: var(--main-font);
    background-color: var(--body-bg);
    color: var(--dark-color);
}

/* ====== Navbar Styles ====== */
.navbar {
    background-color: var(--dark-color);
}

.navbar .nav-link {
    color: var(--light-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar .nav-link:hover, 
.navbar .nav-link:focus {
    color: var(--primary-color);
}

/* ====== Button Styles ====== */
.btn-primary {
    --bs-btn-color: var(--dark-color);
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: var(--dark-color);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-color: var(--dark-color);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-disabled-color: var(--dark-color);
    --bs-btn-disabled-bg: var(--primary-light);
    --bs-btn-disabled-border-color: var(--primary-light);
    font-weight: 600;
    box-shadow: var(--btn-shadow);
}

.btn-outline-primary {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: var(--dark-color);
    --bs-btn-hover-bg: var(--primary-color);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-active-color: var(--dark-color);
    --bs-btn-active-bg: var(--primary-color);
    --bs-btn-active-border-color: var(--primary-color);
    font-weight: 600;
}

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

/* ====== Card Styles ====== */
.card {
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    border: none;
    overflow: hidden;
}

.feature-icon {
    background-color: var(--dark-color);
    color: var(--primary-color);
}

.exercise-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 340px; /* Standardized minimum height */
    position: relative; /* Needed for the badges */
}

.exercise-card .card-top {
    flex: 1 1 auto; /* Grow and shrink as needed */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.exercise-card .card-bottom {
    margin-top: auto;
    padding-top: 1rem;
}

.exercise-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.dashboard-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
}

.streak-card {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* ====== Badge Styles ====== */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: var(--border-radius-pill);
}

.progress-badge {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.badge-completed {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
    padding: 0.5em 0.75em;
    border-radius: var(--border-radius-pill);
    font-size: 0.8rem;
}

.badge-in-progress {
    background-color: rgba(255, 193, 7, 0.2);
    color: #e6a800;
    padding: 0.5em 0.75em;
    border-radius: var(--border-radius-pill);
    font-size: 0.8rem;
}

.badge-not-started {
    background-color: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    padding: 0.5em 0.75em;
    border-radius: var(--border-radius-pill);
    font-size: 0.8rem;
}

.time-remaining {
    background-color: var(--primary-light);
    color: var(--dark-color);
    font-size: 1rem;
}

/* ====== Logo and Avatar Styles ====== */
.logo-container {
    width: 40px;
    height: 40px;
    overflow: hidden;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-container {
    position: relative;
    width: 60px;
    height: 60px;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 1rem;
}

/* ====== Typography Styles ====== */
.exercise-title {
    color: var(--dark-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    height: 3.6rem; /* Fixed height for title */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
}

.subtitle {
    color: var(--secondary-color);
    font-size: 0.9rem;
    height: 1.35rem; /* Fixed height for subtitle */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 1rem !important; /* Consistent spacing */
}

@media (max-width: 767.98px) {
    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.75rem !important;
    }
}

/* Card structure to push button to bottom */
/* These styles are now defined in the .exercise-card section above */

/* ====== Badge and Indicator Styles ====== */
.difficulty-badge, .time-badge {
    display: inline-flex;
    align-items: center;
    color: var(--dark-color);
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: var(--border-radius-pill);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* ====== Button Styles for Cards ====== */
.card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.card-btn:hover {
    background-color: var(--primary-dark);
}

/* ====== Progress Bar Styles ====== */
.progress {
    height: 10px;
    border-radius: var(--border-radius-pill);
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary-color);
}

/* ====== Day Activity Indicators ====== */
.day-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.day-complete {
    color: var(--success-color);
    font-size: 1.2rem;
}

.day-incomplete {
    color: #dee2e6;
    font-size: 1.2rem;
}

/* ====== Test Result Styles ====== */
.correct-answer {
    background-color: rgba(40, 167, 69, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 0 0.25rem;
}

.wrong-answer {
    text-decoration: line-through;
    background-color: rgba(220, 53, 69, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 0 0.25rem;
}

.display-answer {
    color: var(--success-color);
    font-weight: 600;
}

/* ====== Footer Styles ====== */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
}

.footer a {
    color: var(--primary-color);
}

.footer a:hover {
    color: var(--primary-light);
}

/* ====== Alert Styles ====== */
.alert-primary {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: var(--dark-color);
}

/* ====== Responsive Adjustments ====== */
@media (max-width: 767.98px) {
    .exercise-card {
        padding: 1rem;
        min-height: 320px; /* Standardize minimum height for mobile */
        display: flex;
        flex-direction: column;
    }
    
    .exercise-card .card-top {
        flex: 1;
    }
    
    .exercise-card .card-bottom {
        margin-top: auto;
    }
    
    .exercise-title {
        font-size: 1.3rem;
        height: 3.2rem; /* Consistent height for title on mobile */
    }
    
    .difficulty-badge, .time-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ====== Progress Bar Stepper ====== */
.progress-steps-container {
    position: relative;
    padding: 20px 0;
}

.progress-line {
    height: 3px;
    position: absolute;
    top: 30px;
    width: 100%;
    z-index: 1;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    position: relative; 
    z-index: 2;
}

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

.step-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.step-icon.completed {
    background-color: var(--success-color);
    color: white;
}

.step-icon.active {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border: 2px solid var(--dark-color);
}

.step-icon.inactive {
    background-color: var(--light-color);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 5px;
    color: var(--dark-color);
}

/* Premium content styling */
.locked-test {
    position: relative;
    opacity: 0.9;
    filter: grayscale(30%);
    box-shadow: 0 0 0 2px var(--primary-color) !important;
    transition: all 0.3s ease;
}

.locked-test:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-5px);
}

.premium-badge, .free-trial-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--border-radius-pill);
    font-size: 0.8rem;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-badge {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.free-trial-badge {
    background-color: #28a745; /* Green color for free trial */
    color: white;
}

.premium-badge .bi-stars {
    color: var(--dark-color);
    margin-right: 5px;
}

.free-trial-badge .bi-unlock-fill {
    color: white;
    margin-right: 5px;
}

@media (max-width: 767.98px) {
    .premium-badge, .free-trial-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* Subscription modal */
.subscription-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.subscription-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.subscription-modal h3 {
    margin-bottom: 20px;
    color: #212529;
}

.subscription-modal h3 .fa-crown {
    color: #ffc107;
    margin-right: 10px;
}

.modal-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.upgrade-btn {
    background-color: var(--primary-color) !important;
    color: var(--dark-color) !important;
    border: 2px solid var(--primary-dark) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    background-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.difficulty-time-container {
    display: flex;
    margin-bottom: 1.25rem !important;
}

@media (max-width: 767.98px) {
    .difficulty-time-container {
        margin-bottom: 1rem !important;
    }
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.navbar-toggler {
    outline: none;
}