:root {
    --yoga-purple: #8B4F99;
    --warm-peach: #E8A87C;
    --soft-cream: #F7F3F0;
    --charcoal-grey: #4A4A4A;
    --sage-green: #A8D8A8;
    --light-pink: #FFE4E1;
    --white: #FFFFFF;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--charcoal-grey);
    background-color: var(--white);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background-color: var(--soft-cream);
    border-right: 1px solid rgba(74, 74, 74, 0.1);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(74, 74, 74, 0.1);
    background-color: var(--white);
}

.sidebar-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--yoga-purple);
    margin: 0;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 14px;
    color: var(--charcoal-grey);
    opacity: 0.7;
}

.journey-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.loading {
    padding: 20px;
    text-align: center;
    color: var(--charcoal-grey);
    opacity: 0.6;
}

.journey-item {
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.journey-item:hover {
    background-color: var(--light-pink);
}

.journey-item.active {
    background-color: var(--yoga-purple);
    color: var(--white);
    border-left-color: var(--warm-peach);
}

.journey-number {
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journey-item.active .journey-number {
    opacity: 0.8;
}

.journey-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.journey-category {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: var(--warm-peach);
    margin-top: 4px;
    opacity: 0.9;
}

.journey-item.active .journey-category {
    color: var(--warm-peach);
    opacity: 1;
}

.sidebar-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    background-color: var(--white);
}

.welcome-message {
    text-align: center;
    max-width: 600px;
    margin: 100px auto;
    padding: 40px;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.welcome-message h2 {
    font-size: 32px;
    color: var(--yoga-purple);
    margin-bottom: 15px;
}

.welcome-message p {
    font-size: 18px;
    color: var(--charcoal-grey);
    opacity: 0.8;
}

.journey-detail {
    animation: fadeIn 0.3s ease;
}

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

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

.journey-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--yoga-purple);
}

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

.stage-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.stage-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.stage-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--yoga-purple);
    opacity: 0.7;
    margin-bottom: 8px;
}

.pose-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--charcoal-grey);
    margin-bottom: 12px;
}

.chakra-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--sage-green);
    color: var(--charcoal-grey);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.stage-info {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--charcoal-grey);
}

.stage-label {
    font-weight: 600;
    color: var(--yoga-purple);
}

.affirmation {
    font-style: italic;
    font-size: 16px;
    color: var(--charcoal-grey);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(74, 74, 74, 0.1);
    opacity: 0.9;
}

.stage-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.image-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        min-height: 300px;
        max-height: 50vh;
        overflow-y: auto;
    }

    .journey-list {
        max-height: none;
        flex: 0 0 auto;
    }

    .main-content {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
    }

    .stages-grid {
        grid-template-columns: 1fr;
    }

    .welcome-message {
        margin: 40px auto;
        padding: 20px;
    }

    .journey-item {
        padding: 14px 16px;
    }

    .journey-name {
        font-size: 14px;
    }

    .sidebar-header h1 {
        font-size: 18px;
    }

    .sidebar-controls {
        padding: 12px 16px;
    }

    .search-input, .filter-select {
        padding: 14px 12px;
        font-size: 16px;
        margin-bottom: 12px;
        min-height: 48px;
    }

    .filter-select {
        padding-right: 40px;
        background-size: 20px;
    }
}

@media (min-width: 1200px) {
    .stages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1600px) {
    .main-content {
        padding: 60px;
    }
}

.sidebar-controls {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(74, 74, 74, 0.1);
    background-color: var(--white);
}

.search-input, .filter-select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(74, 74, 74, 0.15);
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    background-color: var(--white);
    cursor: pointer;
}

.search-input:focus, .filter-select:focus {
    outline: none;
    border-color: var(--yoga-purple);
}

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A4A4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(74, 74, 74, 0.1);
    background-color: var(--white);
}

.analytics-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--yoga-purple);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analytics-btn:hover {
    background-color: #7a4589;
}

.stage-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.stage-details-content {
    background-color: var(--white);
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.stage-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid var(--yoga-purple);
}

.stage-details-header h2 {
    color: var(--yoga-purple);
    font-size: 24px;
    margin: 0;
}

.stage-details-text {
    padding: 30px;
    overflow-y: auto;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--charcoal-grey);
}

.stage-card {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stage-card:hover {
    transform: translateY(-2px);
}

.journey-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
}

.favorite-btn .heart {
    color: var(--yoga-purple);
}

.favorite-btn.favorited .heart {
    content: '♥';
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.filter-controls {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 30px;
}

.stage-card {
    position: relative;
}

.timer-btn-small {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: var(--warm-peach);
    color: var(--charcoal-grey);
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-btn-small:hover {
    background-color: #d99a6d;
}

.timer-stage-image {
    margin: 15px 0;
    text-align: center;
    min-height: 500px;
    max-height: 75vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.images-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.image-container {
    flex: 1;
    max-width: 50%;
    position: relative;
}

.stage-image {
    max-width: 100%;
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(139, 79, 153, 0.9);
    color: white;
    padding: 5px 15px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.affirmation-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(139, 79, 153, 0.85);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    max-width: 80%;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-style: italic;
}

@media (max-width: 768px) {
    .images-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    .image-container {
        max-width: 100%;
    }
}


.image-loading {
    color: #999;
    font-style: italic;
    padding: 20px;
}

.timer-stage-name {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    z-index: 5;
    padding: 10px 20px;
    background-color: rgba(139, 79, 153, 0.8);
    border-radius: 8px;
}

.analytics-view {
    animation: fadeIn 0.3s ease;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.close-analytics-btn {
    padding: 10px 20px;
    background-color: var(--soft-cream);
    color: var(--charcoal-grey);
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-analytics-btn:hover {
    background-color: var(--light-pink);
}

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

.stat-card {
    background-color: var(--soft-cream);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--yoga-purple);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: var(--charcoal-grey);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-section, .recent-section {
    margin-bottom: 40px;
}

.progress-section h3, .recent-section h3 {
    font-size: 20px;
    color: var(--yoga-purple);
    margin-bottom: 20px;
}

.progress-item {
    background-color: var(--white);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.progress-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-bar {
    height: 8px;
    background-color: var(--soft-cream);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--sage-green);
    transition: width 0.3s ease;
}

.recent-item {
    background-color: var(--white);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid var(--sage-green);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.recent-item-pose {
    font-weight: 600;
    color: var(--charcoal-grey);
}

.recent-item-journey {
    font-size: 14px;
    color: var(--yoga-purple);
}

.recent-item-time {
    font-size: 12px;
    color: var(--charcoal-grey);
    opacity: 0.6;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h3 {
    color: var(--yoga-purple);
    font-size: 24px;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--charcoal-grey);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.timer-display {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.timer-circle {
    position: relative;
}

.timer-svg {
    transform: rotate(-90deg);
    width: 80px;
    height: 80px;
}

.timer-bg {
    fill: none;
    stroke: var(--soft-cream);
    stroke-width: 4;
}

.timer-progress {
    fill: none;
    stroke: var(--sage-green);
    stroke-width: 4;
    stroke-dasharray: 226.19;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--yoga-purple);
}

.timer-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.timer-btn {
    padding: 12px 30px;
    background-color: var(--sage-green);
    color: var(--charcoal-grey);
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-btn:hover {
    background-color: #98c898;
}

.timer-btn.secondary {
    background-color: var(--light-pink);
}

.timer-btn.secondary:hover {
    background-color: #ffd4d1;
}

.timer-duration {
    text-align: center;
}

.timer-duration label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--charcoal-grey);
}

.timer-duration input {
    padding: 10px;
    width: 100px;
    border: 1px solid rgba(74, 74, 74, 0.2);
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
}

.timer-stage-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    z-index: 5;
}

.timer-affirmation {
    font-style: italic;
    color: var(--white);
    font-size: 18px;
    margin: 0;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.timer-navigation {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(74, 74, 74, 0.1);
}

.nav-btn {
    padding: 10px 20px;
    background-color: var(--soft-cream);
    color: var(--charcoal-grey);
    border: none;
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    background-color: var(--light-pink);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timer-audio-settings {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.timer-audio-settings label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.timer-audio-settings input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--sage-green);
}

.guided-journey-btn {
    padding: 10px 20px;
    background-color: var(--warm-peach);
    color: var(--charcoal-grey);
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.guided-journey-btn:hover {
    background-color: #d99a6d;
    transform: translateY(-1px);
}

.timer-audio-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}