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

/* Technique Selector */

.technique-selector h2 {
    font-size: 2rem;
    color: #5a67d8;
    margin-bottom: 1.5rem;
    text-align: center;
}

.technique-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

[hidden] {
    display: none !important;
}

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

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

.technique-card.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.tech-name {
    color: #2d3748;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.tech-desc {
    color: #718096;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
}

.tech-pattern {
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
    font-size: 0.9rem;
    background: #c6f6d5;
    color: #276749;
    font-weight: 600;
    margin-bottom: .75rem;
}

/* Breathing Interface */
.breathing-interface {
    text-align: center;
    background: #f8fafc;
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.breath-visual {
    margin: 3rem 0;
}

.breath-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: all 0.5s ease;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.breath-circle.inhale {
    transform: scale(1.1);
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.4);
}

.breath-circle.hold-inhale {
    transform: scale(1.05);
    background: conic-gradient(from 0deg, #4facfe, #a0aec0, #4facfe);
    animation: pulse 2s infinite;
}

.breath-circle.exhale {
    transform: scale(0.9);
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

.breath-circle.hold-exhale {
    transform: scale(0.95);
    background: conic-gradient(from 180deg, #667eea, #6cb7e5, #667eea);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.breath-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.breath-timer {
    font-size: 2rem;
    font-weight: 300;
}

.breath-controls {
    max-width: 400px;
    margin: 0 auto;
}

.breath-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

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

.back-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.back-btn:hover {
    text-decoration: underline;
}

/* Custom Breathing */
.custom-breath {
    max-width: 600px;
    margin: 0 auto;
    background: #f8fafc;
    border-radius: 20px;
    padding: 0rem 1.5rem;
    padding-bottom: 1rem;
}

.custom-breath h2 {
    padding-top: 1rem;
}

.pattern-builder {
    margin: 2rem 0;
}

.phase-control {
    margin-bottom: 1.5rem;
}

.phase-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.phase-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
}

.phase-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.custom-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Button Styles */
.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;
}

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

    .breath-circle {
        width: 250px;
        height: 250px;
    }

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

    .btn {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {

    .breath-circle {
        width: 200px;
        height: 200px;
    }

    .breath-text {
        font-size: 1.2rem;
    }

    .breath-timer {
        font-size: 1.5rem;
    }
}

/* Tablet and larger */
@media (min-width: 600px) {
    .technique-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop and larger */
@media (min-width: 900px) {
    .technique-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Simple Session Timer */
.session-timer {
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    background: #f7fafc;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    min-width: 50px;
    text-align: center;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    /* Ensures equal character width */
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .session-timer {
        font-size: 0.9rem;
        padding: 0.25rem 0.5rem;
        min-width: 45px;
        border-radius: 4px;
    }

    .breath-stats {
        gap: 0.5rem;
        /* Reduce gap between items on mobile */
    }
}

@media (max-width: 480px) {
    .session-timer {
        font-size: 0.85rem;
        padding: 0.2rem 0.4rem;
        min-width: 40px;
    }

    .breath-stats {
        font-size: 0.9rem;
        /* Slightly smaller text on very small screens */
    }
}

/* Warning state when time is running out */
.session-timer.warning {
    color: #c53030;
    background: #fed7d7;
    border-color: #feb2b2;
}

/* Completed state */
.session-timer.completed {
    color: #276749;
    background: #c6f6d5;
    border-color: #9ae6b4;
}

/* Simple saved state for button */
#savePatternBtn {
    transition: all 0.3s ease;
}

/* Session Controls Group */
.session-controls-group {
    margin: 1.5rem 0;
    text-align: center;
}

.control-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-item label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Unified Select Styles */
.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;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.volume-control.hidden {
    display: none !important;
}

.volume-slider {
    width: 150px;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

#volumeValue {
    font-size: 0.9rem;
    color: #718096;
    min-width: 40px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .control-row {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

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

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

    .volume-control {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .control-item label {
        font-size: 0.9rem;
    }

    .styled-select {
        padding: 0.7rem 2.5rem 0.7rem 1rem;
        font-size: 0.95rem;
    }
}