/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #222831;
    color: #EEEEEE;
    line-height: 1.6;
    padding-bottom: 80px;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 20px 20px;
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(135deg, #393E46 0%, #222831 100%);
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #00ADB5;
}

header h1 {
    color: #FFD369;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.user-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

#user-level {
    font-size: 0.9rem;
    color: #00ADB5;
    font-weight: 600;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ADB5, #FFD369);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Main Content */
main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

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

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 173, 181, 0.3);
}

.welcome-card h2 {
    color: #FFD369;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.welcome-card p {
    color: #EEEEEE;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: rgba(0, 173, 181, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(0, 173, 181, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 173, 181, 0.2);
}

.stat-card i {
    font-size: 2rem;
    color: #00ADB5;
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    color: #FFD369;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #EEEEEE;
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #00ADB5, #008B94);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 173, 181, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 173, 181, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #393E46, #2a2f36);
    color: #EEEEEE;
    border: 1px solid #00ADB5;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #00ADB5, #008B94);
    color: white;
}

.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Lessons Section */
.lessons-container {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.lesson-card {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 173, 181, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lesson-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lesson-header h3 {
    color: #FFD369;
    font-size: 1.3rem;
}

.lesson-status {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lesson-status[data-status="available"] {
    background: rgba(0, 173, 181, 0.2);
    color: #00ADB5;
    border: 1px solid #00ADB5;
}

.lesson-status[data-status="completed"] {
    background: rgba(255, 211, 105, 0.2);
    color: #FFD369;
    border: 1px solid #FFD369;
}

.lesson-status[data-status="locked"] {
    background: rgba(255, 255, 255, 0.1);
    color: #999;
    border: 1px solid #666;
}

.lesson-card p {
    color: #EEEEEE;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    max-width: 90%;
    max-height: 80%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #00ADB5;
}

.modal-header {
    background: linear-gradient(135deg, #00ADB5, #008B94);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: white;
    font-size: 1.5rem;
}

.close-modal {
    font-size: 2rem;
    color: white;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 173, 181, 0.3);
    text-align: right;
}

.lesson-audio {
    margin: 1.5rem 0;
    text-align: center;
}

/* Training Section */
.training-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.mode-card {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mode-card:hover, .mode-card.active {
    border-color: #00ADB5;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 173, 181, 0.2);
}

.mode-card h3 {
    color: #FFD369;
    margin-bottom: 0.5rem;
}

.mode-card p {
    color: #EEEEEE;
    font-size: 0.9rem;
}

.exercise-container {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 173, 181, 0.3);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.exercise-header h3 {
    color: #FFD369;
    font-size: 1.4rem;
}

.exercise-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.exercise-stats span {
    color: #00ADB5;
    font-size: 0.9rem;
    font-weight: 600;
}

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

.audio-player button {
    margin: 0 0.5rem;
}

.answer-options h4 {
    color: #FFD369;
    margin-bottom: 1rem;
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    background: linear-gradient(135deg, #393E46, #2a2f36);
    color: #EEEEEE;
    border: 1px solid #00ADB5;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.option-btn:hover {
    background: linear-gradient(135deg, #00ADB5, #008B94);
    color: white;
    transform: translateY(-2px);
}

.option-btn.correct {
    background: linear-gradient(135deg, #28a745, #20a03a);
    color: white;
}

.option-btn.incorrect {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.exercise-feedback {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 600;
}

.exercise-feedback.correct {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.exercise-feedback.incorrect {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* Piano Section */
.piano-container {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 173, 181, 0.3);
}

.piano-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.octave-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#current-octave {
    color: #FFD369;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-control label {
    color: #00ADB5;
    font-weight: 600;
}

#volume-slider {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

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

.piano-keyboard {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #2a2f36, #1e2328);
    border-radius: 10px;
    overflow-x: auto;
    min-height: 200px;
}

.piano-key {
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.piano-key.white {
    width: 40px;
    height: 180px;
    background: linear-gradient(to bottom, #ffffff, #f0f0f0);
    border: 1px solid #ccc;
    color: #333;
    padding-bottom: 10px;
}

.piano-key.black {
    width: 25px;
    height: 120px;
    background: linear-gradient(to bottom, #333, #000);
    color: white;
    margin: 0 -12.5px;
    z-index: 2;
    padding-bottom: 10px;
}

.piano-key:hover {
    transform: translateY(2px);
}

.piano-key.active {
    transform: translateY(4px);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.3);
}

.piano-key.white.active {
    background: linear-gradient(to bottom, #e0e0e0, #d0d0d0);
}

.piano-key.black.active {
    background: linear-gradient(to bottom, #555, #222);
}

.piano-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.current-note, .chord-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#current-note, #current-chord {
    color: #FFD369;
    font-weight: 600;
    min-width: 50px;
}

/* Composition Section */
.composition-tools {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 173, 181, 0.3);
}

.composition-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.composition-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

#composition-name {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    border: 1px solid #00ADB5;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: #EEEEEE;
    font-size: 1rem;
}

#composition-name::placeholder {
    color: #999;
}

#composition-tempo {
    padding: 0.8rem;
    border: 1px solid #00ADB5;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: #EEEEEE;
    font-size: 1rem;
}

.composition-workspace {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 173, 181, 0.3);
    margin-bottom: 2rem;
}

.note-palette {
    margin-bottom: 2rem;
}

.note-palette h4 {
    color: #FFD369;
    margin-bottom: 1rem;
}

.note-buttons, .duration-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.note-btn, .duration-btn {
    padding: 0.6rem 1rem;
    border: 1px solid #00ADB5;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: #EEEEEE;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.note-btn:hover, .duration-btn:hover {
    background: linear-gradient(135deg, #00ADB5, #008B94);
    color: white;
}

.note-btn.active, .duration-btn.active {
    background: linear-gradient(135deg, #FFD369, #e6be5a);
    color: #222831;
}

.composition-canvas {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.staff-container {
    position: relative;
}

.measure-numbers {
    display: flex;
    justify-content: space-around;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: 600;
}

.staff {
    position: relative;
    height: 120px;
    background-image: 
        repeating-linear-gradient(
            transparent,
            transparent 23px,
            #333 23px,
            #333 24px
        );
    border-left: 3px solid #333;
    border-right: 1px solid #333;
}

.note-on-staff {
    position: absolute;
    width: 20px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    transform: translateY(-6px);
    cursor: pointer;
}

.note-on-staff:hover {
    background: #00ADB5;
}

.saved-compositions {
    margin-top: 2rem;
}

.saved-compositions h3 {
    color: #FFD369;
    margin-bottom: 1rem;
}

.compositions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.composition-item {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 173, 181, 0.3);
    transition: transform 0.3s ease;
}

.composition-item:hover {
    transform: translateY(-3px);
}

.composition-item h4 {
    color: #FFD369;
    margin-bottom: 0.5rem;
}

.composition-item p {
    color: #EEEEEE;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.composition-actions {
    display: flex;
    gap: 0.5rem;
}

.composition-actions button {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8rem;
}

/* Progress Section */
.progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.progress-card {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 173, 181, 0.3);
}

.progress-card h3 {
    color: #FFD369;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.level-display {
    text-align: center;
}

.level-display span {
    display: block;
    margin-bottom: 1rem;
}

#current-level {
    font-size: 1.5rem;
    color: #00ADB5;
    font-weight: 600;
}

.xp-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ADB5, #FFD369);
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

#xp-text {
    color: #EEEEEE;
    font-size: 0.9rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
}

.achievement-item {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.achievement-item.unlocked {
    background: rgba(255, 211, 105, 0.2);
    border: 1px solid #FFD369;
}

.achievement-item.locked {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #666;
    opacity: 0.5;
}

.achievement-item:hover.unlocked {
    transform: scale(1.05);
}

.achievement-item .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.achievement-item .title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #EEEEEE;
}

.detailed-progress {
    display: grid;
    gap: 2rem;
}

.progress-section {
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 173, 181, 0.3);
}

.progress-section h4 {
    color: #FFD369;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.lesson-progress-item, .training-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 4px solid #00ADB5;
}

.lesson-progress-item.completed {
    border-left-color: #FFD369;
}

.lesson-progress-item .title {
    color: #EEEEEE;
    font-weight: 600;
}

.lesson-progress-item .status {
    color: #00ADB5;
    font-size: 0.9rem;
}

.lesson-progress-item.completed .status {
    color: #FFD369;
}

/* FAQ Section */
.faq-section {
    margin: 3rem 0;
    background: linear-gradient(135deg, #393E46 0%, #2a2f36 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 173, 181, 0.3);
}

.faq-section h2 {
    color: #FFD369;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 173, 181, 0.3);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    color: #EEEEEE;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(0, 173, 181, 0.1);
    color: #00ADB5;
}

.faq-question[aria-expanded="true"] {
    background: rgba(0, 173, 181, 0.1);
    color: #00ADB5;
}

.faq-icon {
    font-size: 1.5rem;
    color: #00ADB5;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer:not([hidden]) {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: #EEEEEE;
    line-height: 1.6;
    margin: 0;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #393E46 0%, #222831 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    border-top: 2px solid #00ADB5;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #EEEEEE;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
    min-width: 60px;
}

.nav-item:hover, .nav-item.active {
    color: #FFD369;
    background: rgba(0, 173, 181, 0.1);
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 173, 181, 0.3);
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.3rem;
    }
    
    .user-progress {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .exercise-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .piano-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .piano-keyboard {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 1rem;
    }
    
    .piano-key.white {
        width: 35px;
        height: 160px;
    }
    
    .piano-key.black {
        width: 22px;
        height: 110px;
        margin: 0 -11px;
    }
    
    .composition-controls {
        justify-content: center;
    }
    
    .composition-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .progress-overview {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 2% auto;
        max-width: 95%;
        max-height: 90%;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.5rem;
    }
    
    .welcome-card, .composition-tools, .composition-workspace, 
    .exercise-container, .piano-container, .progress-card, 
    .progress-section, .faq-section {
        padding: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .composition-controls {
        gap: 0.3rem;
    }
    
    .composition-controls button {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

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

.slide-in-up {
    animation: slideInUp 0.3s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus, .nav-item:focus, .piano-key:focus, 
.option-btn:focus, .faq-question:focus {
    outline: 2px solid #FFD369;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lesson-card, .mode-card, .exercise-container, 
    .piano-container, .composition-tools, .composition-workspace {
        border-width: 2px;
    }
}
