/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    /* Responsive height - 450px for iframe, 90vh for full browser */
    height: 450px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Check if running in full browser tab */
@media (min-height: 500px) {
    body {
        height: 90vh;
    }
}

/* Main container */
.container {
    width: 100%;
    height: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Ukulele section */
.ukulele-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

/* Ukulele neck */
.ukulele-neck {
    position: relative;
    width: 90%;
    max-width: 500px;
    height: 200px;
    background: linear-gradient(to right, #8B4513, #D2691E);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

/* Fret markers */
.fret-markers {
    position: absolute;
    top: -25px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0 10%;
}

.fret-number {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Strings container */
.strings {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 20px 0;
}

/* Individual string */
.string {
    position: relative;
    height: 3px;
    background: #C0C0C0;
    margin: 0 10%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Fret positions on strings */
.fret {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

/* Finger position indicator */
.fret.active {
    background: #FF6B6B;
    border: 2px solid #FF4757;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
    animation: pulse 1.5s infinite;
}

/* Pulse animation for active fret */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Fret lines */
.fret-lines {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10%;
    right: 10%;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
}

.fret-line {
    width: 2px;
    height: 100%;
    background: #654321;
    opacity: 0.7;
}

/* String labels */
.string-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 200px;
    padding: 20px 0;
    margin-left: 10px;
}

.string-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Controls section */
.controls-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

/* Chord button */
.chord-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    min-height: 50px;
    min-width: 200px;
}

.chord-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.chord-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* Instructions */
.instructions {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
    cursor: help;
}

.info-icon {
    background: #3498db;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Feedback section */
.feedback-section {
    text-align: center;
    min-height: 40px;
}

.chord-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.finger-position {
    font-size: 14px;
    color: #666;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .ukulele-neck {
        height: 150px;
    }
    
    .string-labels {
        height: 150px;
    }
    
    .chord-button {
        padding: 12px 25px;
        font-size: 16px;
        min-width: 180px;
    }
    
    .fret-number {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}

/* Touch support for mobile */
@media (hover: none) and (pointer: coarse) {
    .chord-button {
        min-height: 55px;
    }
    
    .fret {
        width: 25px;
        height: 25px;
    }
}

/* Tooltip styles */
[title] {
    position: relative;
}

/* Visual feedback for interaction states */
.chord-button:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}