/* Meditation App Styles */
.meditation-app {
    padding: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

/* Category Selector */
.category-selector h2 {
    font-size: 2rem;
    color: #5a67d8;
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.category-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    padding: 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 220px;
}

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

.category-icon {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #2d3748;
}

.category-card p {
    color: #7c838e;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.session-count {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: auto;
    background: #c6f6d5;
    color: #276749;
    font-weight: 600;
}

/* Guided Meditation */
.guided-interface h2,
.selfguided-interface h2 {
    font-size: 1.8rem;
    color: #5a67d8;
    margin-bottom: 1.5rem;
}

.session-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 600px) {
    .session-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.session-card {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    text-align: left;
}

.session-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.session-card.active {
    border-color: #667eea;
    background: #edf2f7;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.session-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.session-time {
    background: #c6f6d5;
    color: #276749;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.session-goal {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.session-desc {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Guided meditation controls */
.session-controls {
    margin: 1.5rem 0;
}

.session-controls .control-row {
    justify-content: center;
    margin-bottom: 0;
}

.session-controls .control-item {
    min-width: 200px;
}

.session-controls .volume-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.session-controls .volume-slider {
    width: 120px;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Meditation Player */
.meditation-player,
.tool-player {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.player-header {
    text-align: center;
    margin-bottom: 2rem;
}

.player-header h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.player-header p {
    color: #718096;
    font-style: italic;
}

/* Visual Elements */
.meditation-visual,
.sound-visual,
.silent-visual {
    margin: 2rem 0;
}

.meditation-circle,
.sound-circle,
.silent-circle {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: all 0.5s ease;
}

.meditation-circle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.3);
}

.sound-circle {
    background: linear-gradient(135deg, #4fd1c5, #38b2ac);
    box-shadow: 0 15px 30px rgba(79, 209, 197, 0.3);
}

.silent-circle {
    background: linear-gradient(135deg, #a0aec0, #718096);
    box-shadow: 0 15px 30px rgba(160, 174, 192, 0.3);
}

.meditation-timer,
.sound-timer,
.silent-timer {
    font-size: 2.5rem;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
}

.sound-name,
.silent-status {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Mantra Display */
.mantra-visual {
    margin: 2rem 0;
    position: relative;
}

.mantra-display {
    background: linear-gradient(135deg, #38b2ac, #319795);
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 35px rgba(56, 178, 172, 0.4);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mantra-text {
    font-size: 3.5rem;
    font-family: Georgia, 'Times New Roman', Times, serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: white;
    margin-bottom: 0.5rem;
    transition: all 0.5s ease;
}

.mantra-timer {
    font-size: 1.4rem;
    color: #4a5568;
    background: #f7fafc;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    border: 2px solid #e2e8f0;
}

/* Controls */
.player-controls,
.sound-controls,
.silent-controls,
.mantra-controls {
    margin-top: 2rem;
}

.control-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.session-progress {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    width: 0%;
    transition: width 0.5s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: #718096;
    font-size: 0.9rem;
}

/* Tool Selector */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.tool-card {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    text-align: center;
}

.tool-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h4 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
}

/* Form Controls */
.control-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 200px;
}

.control-item label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.mantra-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.mantra-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.bell-preview {
    margin: 1rem 0;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 180px;
}

.styled-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    color: #4a5568;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.styled-select:hover {
    border-color: #cbd5e0;
}

.styled-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #718096;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.styled-select:focus+.select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #667eea;
}


/* Back Buttons */
.back-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #f7fafc;
    text-decoration: none;
}

.global-back {
    display: block;
    margin: 2rem auto;
}

.tool-back {
    margin-top: 1.5rem;
}

/* Button Styles (consistent with breathing.css) */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn.primary {
    background: #667eea;
    color: white;
}

.btn.primary:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn.secondary:hover:not(:disabled) {
    background: #cbd5e0;
}

.btn.outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn.outline:hover {
    background: #667eea;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Hide back button on category page */
.category-selector:not([hidden]) ~ .global-back {
    display: none !important;
}

/* Show back button on other pages */
.guided-interface:not([hidden]) ~ .global-back,
.selfguided-interface:not([hidden]) ~ .global-back {
    display: block;
}

/* Animation Classes */
@keyframes fadeInOut {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes breath {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

.mantra-fade {
    animation: fadeInOut 4s infinite ease-in-out;
}

.mantra-pulse {
    animation: pulse 3s infinite ease-in-out;
}

.mantra-breath {
    animation: breath 6s infinite ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-selector h2 {
        font-size: 1.5rem;
    }

    .guided-interface h2,
    .selfguided-interface h2 {
        font-size: 1.4rem;
    }

    .meditation-circle,
    .sound-circle,
    .silent-circle {
        width: 200px;
        height: 200px;
    }

    .meditation-timer,
    .sound-timer,
    .silent-timer {
        font-size: 2rem;
    }

    .mantra-text {
        font-size: 3rem;
    }

    .mantra-timer {
        font-size: 1.2rem;
    }

    .control-row {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .select-wrapper {
        min-width: 100%;
    }

    .control-item {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .meditation-circle,
    .sound-circle,
    .silent-circle {
        width: 180px;
        height: 180px;
    }

    .mantra-display {
        padding: 2rem;
        min-height: 150px;
    }

    .tool-player {
        padding: 1rem;
    }

    .mantra-text {
        font-size: 2.3rem;
    }

     .mantra-timer {
        font-size: 1rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .category-icon {
        font-size: 2.5rem;
    }

    .control-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}