/* Guitar Fretboard Pattern Designer Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #fff;
    padding: 20px;
    min-height: 100vh;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Controls Section */
.controls {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

/* Fretboard Container */
.fretboard-container {
    background: #2a2a2a;
    padding: 40px;
    border-radius: 15px;
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.fretboard {
    position: relative;
    width: 689px;
    height: 230px;
    background: linear-gradient(to right, #3a3a3a, #2a2a2a);
    border-radius: 10px;
    margin: 0 auto;
}

/* Strings */
.string {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #888;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.string:nth-child(1) { top: 15px; }
.string:nth-child(2) { top: 54px; }
.string:nth-child(3) { top: 92px; }
.string:nth-child(4) { top: 131px; }
.string:nth-child(5) { top: 168px; }
.string:nth-child(6) { top: 207px; }

/* Frets */
.fret {
    position: absolute;
    width: 3px;
    height: 100%;
    background: #666;
    top: 0;
    transition: opacity 0.3s;
}

.fret.first-visible {
    width: 5px;
    background: #999;
}

.fret.hidden {
    display: none;
}

/* Fret Markers */
.fret-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #555;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

.fret-marker.hidden {
    display: none;
}

.fret-marker.double {
    height: 10px;
    width: 10px;
}

/* Notes */
.note {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(245, 87, 108, 0.5);
    z-index: 10;
}

.note:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

/* Note Colors */
.note.color-pink {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    box-shadow: 0 2px 10px rgba(245, 87, 108, 0.5);
}

.note.color-pink:hover {
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.8);
}

.note.color-blue {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    box-shadow: 0 2px 10px rgba(79, 172, 254, 0.5);
}

.note.color-blue:hover {
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.8);
}

.note.color-green {
    background: linear-gradient(45deg, #3dd470, #2ee6c4);
    box-shadow: 0 2px 10px rgba(61, 212, 112, 0.5);
}

.note.color-green:hover {
    box-shadow: 0 5px 20px rgba(61, 212, 112, 0.8);
}



.note.color-purple {
    background: linear-gradient(45deg, #667eea, #764ba2);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
}

.note.color-purple:hover {
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.8);
}

.note.color-yellow {
    background: linear-gradient(45deg, #f9ca24, #f0932b);
    box-shadow: 0 2px 10px rgba(249, 202, 36, 0.5);
}

.note.color-yellow:hover {
    box-shadow: 0 5px 20px rgba(249, 202, 36, 0.8);
}

.note.color-gray {
    background: linear-gradient(45deg, #9ca4ab, #7a8289);
    box-shadow: 0 2px 10px rgba(156, 164, 171, 0.5);
}

.note.color-gray:hover {
    box-shadow: 0 5px 20px rgba(156, 164, 171, 0.8);
}

.note.color-turquoise {
    background: linear-gradient(45deg, #0980aa, #1a9bc1);
    box-shadow: 0 2px 10px rgba(9, 128, 170, 0.5);
}

.note.color-turquoise:hover {
    box-shadow: 0 5px 20px rgba(9, 128, 170, 0.8);
}

.note.color-black {
    background: linear-gradient(45deg, #3a3a3a, #2a2a2a);
    box-shadow: 0 2px 10px rgba(58, 58, 58, 0.5);
    color: white;
}

.note.color-black:hover {
    box-shadow: 0 5px 20px rgba(58, 58, 58, 0.8);
}

.note.color-white {
    background: linear-gradient(45deg, #ffffff, #f5f5f5);
    box-shadow: 0 2px 10px rgba(245, 245, 245, 0.5);
    color: black;
    border: 1px solid #ddd;
}

.note.color-white:hover {
    box-shadow: 0 5px 20px rgba(245, 245, 245, 0.8);
}

.note.muted {
    background: none !important;
    box-shadow: none !important;
    color: #f5576c;
    font-size: 18px;
}

.note.muted:hover {
    transform: translate(-50%, -50%);
    box-shadow: none !important;
}

/* Special borders for manually colored degree markers */
.note.special-border-yellow {
    border: 3px solid #f0932b;
}

.note.special-border-blue {
    border: 3px solid #00f2fe;
}

/* Labels */
.string-label {
    position: absolute;
    left: -30px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 20px;
    line-height: 1;
}

.string-label.muted {
    color: #f5576c !important;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 20px;
    margin-top: -2px;
}

.fret-number {
    position: absolute;
    bottom: -30px;
    transform: translateX(-50%);
    color: #888;
    font-size: 14px;
    text-align: center;
    transition: opacity 0.3s;
}

.fret-number.hidden {
    display: none;
}

/* Form Controls */
.mode-selector,
.color-selector,
.range-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

label {
    color: #aaa;
}

select,
input[type="number"] {
    background: #3a3a3a;
    color: white;
    border: 1px solid #555;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 16px;
}

input[type="number"] {
    width: 70px;
}

input[type="file"] {
    display: none;
}

.file-input-label {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Color Selector */
.color-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.color-button:hover {
    transform: scale(1.1);
}

.color-button.active {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.color-button.pink {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.color-button.blue {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.color-button.green {
    background: linear-gradient(45deg, #3dd470, #2ee6c4);
}



.color-button.purple {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.color-button.gray {
    background: linear-gradient(45deg, #9ca4ab, #7a8289);
}

.color-button.turquoise {
    background: linear-gradient(45deg, #0980aa, #1a9bc1);
}

.color-button.theme-adaptive {
    background: linear-gradient(45deg, #ffffff, #f5f5f5);
}

body.light-theme .color-button.theme-adaptive {
    background: linear-gradient(45deg, #3a3a3a, #2a2a2a);
}

.color-button.default {
    background: #444;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 30px;
    border-radius: 5px;
}

.theme-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

#themeToggle {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

#themeToggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Light Theme */
body.light-theme {
    background: #f5f5f5;
    color: #333;
}

body.light-theme .container {
    background: none;
}

body.light-theme .controls {
    background: #fff;
    border: 1px solid #ddd;
}

body.light-theme .fretboard-container {
    background: #fff;
    border: 1px solid #ddd;
}

body.light-theme .fretboard {
    background: #ffffff;
}

body.light-theme .string {
    background: #6d727d;
    height: 2px;
}

body.light-theme .fret {
    background: #6d727d;
    width: 2px;
}

body.light-theme .fret.first-visible {
    background: #666;
    width: 5px;
}

body.light-theme .fret-marker {
    background: #e8e8e8;
}

body.light-theme .string-label {
    color: #666;
}

body.light-theme .fret-number {
    color: #666;
}

body.light-theme select,
body.light-theme input[type="number"] {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
}

body.light-theme label {
    color: #666;
}

body.light-theme .file-input-label {
    color: white;
}

body.light-theme .note {
    color: white !important;
}

.note {
    color: black !important;
}

/* Custom Context Menu */
.context-menu {
    position: fixed;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 150px;
}

.context-menu-item {
    padding: 10px 15px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: #3a3a3a;
}

body.light-theme .context-menu {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme .context-menu-item {
    color: #333;
}

body.light-theme .context-menu-item:hover {
    background: #f5f5f5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fretboard-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
}