/* Professional Records Modal */
.records-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    overflow-y: auto;
    padding: 0;
}

/* Hide global reset icon when records modal is open */
.records-modal-open #reset-icon {
    display: none !important;
}

.records-modal-content {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #0D0D0D 0%, #1a1a1a 100%);
    color: #8A2BE2;
    display: flex;
    flex-direction: column;
}

.records-header {
    background: rgba(138, 43, 226, 0.1);
    border-bottom: 2px solid #8A2BE2;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.records-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #8A2BE2;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reset-records-btn,
.close-records-btn {
    background: none;
    border: 2px solid #8A2BE2;
    color: #8A2BE2;
    font-size: 20px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-records-btn:hover,
.close-records-btn:hover {
    background: #8A2BE2;
    color: #000;
    transform: scale(1.05);
}

.reset-records-btn {
    font-size: 18px;
}

.records-stats {
    background: rgba(138, 43, 226, 0.05);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #8A2BE2;
}

.stat-item i {
    font-size: 16px;
}

.refresh-btn {
    background: #8A2BE2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #9A3BF2;
    transform: translateY(-1px);
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-clear-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8A2BE2;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-clear-icon:hover {
    color: #9A3BF2;
    transform: translateY(-50%) scale(1.2);
}

.records-search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 5px;
    background: rgba(138, 43, 226, 0.05);
    color: #8A2BE2;
    font-size: 14px;
    transition: all 0.3s ease;
}

.records-search-input:focus {
    outline: none;
    border-color: #8A2BE2;
    background: rgba(138, 43, 226, 0.1);
}

.records-search-input::placeholder {
    color: rgba(138, 43, 226, 0.5);
}

.records-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.loading-message {
    text-align: center;
    font-size: 16px;
    color: #8A2BE2;
    margin-top: 50px;
}

.record-card {
    background: rgba(138, 43, 226, 0.08);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.record-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.2);
    border-color: #8A2BE2;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
    gap: 15px;
}

.record-title {
    font-size: 20px;
    font-weight: bold;
    color: #8A2BE2;
    margin: 0;
    flex: 1;
    line-height: 1.2;
}

.record-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.record-date {
    color: rgba(138, 43, 226, 0.7);
    font-size: 12px;
    white-space: nowrap;
}

.record-owner {
    background: rgba(138, 43, 226, 0.2);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    color: #8A2BE2;
    white-space: nowrap;
}

.song-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.song-card {
    background: rgba(138, 43, 226, 0.05);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.song-card:hover {
    border-color: #8A2BE2;
    background: rgba(138, 43, 226, 0.1);
}

.song-number {
    font-size: 12px;
    font-weight: bold;
    color: rgba(138, 43, 226, 0.8);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.song-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 2px solid rgba(138, 43, 226, 0.3);
    transition: border-color 0.3s ease;
}

.song-image:hover {
    border-color: #8A2BE2;
}

.clip-id-section {
    background: rgba(138, 43, 226, 0.1);
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.clip-id-label {
    font-size: 10px;
    font-weight: bold;
    color: rgba(138, 43, 226, 0.8);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clip-id-value {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #8A2BE2;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    line-height: 1.3;
}

.song-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.control-btn {
    background: none;
    border: none;
    color: #8A2BE2;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.control-btn:hover {
    color: #9A3BF2;
    background: rgba(138, 43, 226, 0.1);
    transform: scale(1.1);
}

.control-btn.persona-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.control-btn.wav-btn {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
}

.control-btn.wav-btn:hover {
    background: linear-gradient(135deg, #feb47b 0%, #ff7e5f 100%);
    transform: translateY(-1px);
}

.control-btn.midi-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.control-btn.midi-btn i {
    color: white;
}

.control-btn.midi-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    transform: translateY(-1px);
}

.control-btn.persona-btn i {
    color: white;
}

.control-btn.persona-btn:hover {
    color: #AA4BF2;
    background: rgba(154, 59, 242, 0.1);
}

.clip-copy-btn {
    margin-left: auto;
    padding: 3px;
    min-width: 20px;
    min-height: 20px;
    font-size: 12px;
    background: none !important;
    border: none;
}

.clip-copy-btn:hover {
    background: none !important;
    transform: scale(1.1);
}

.audio-player {
    width: 100%;
    margin: 8px 0;
    border-radius: 4px;
    height: 35px;
}

.record-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(138, 43, 226, 0.2);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.info-item {
    background: rgba(138, 43, 226, 0.05);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #8A2BE2;
}

.info-label {
    font-size: 10px;
    color: rgba(138, 43, 226, 0.8);
    font-weight: bold;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    color: #8A2BE2;
    font-size: 13px;
    word-break: break-word;
    line-height: 1.3;
}

.lyrics-section {
    margin-top: 15px;
    background: rgba(138, 43, 226, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.lyrics-content {
    color: #8A2BE2;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .song-duo {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .records-header {
        padding: 12px 15px;
    }

    .records-header h1 {
        font-size: 20px;
    }

    .records-container {
        padding: 15px 10px;
    }

    .record-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .record-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .record-meta {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }

    .record-title {
        font-size: 18px;
    }

    .song-image {
        height: 120px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .records-stats {
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .song-controls {
        gap: 8px;
        justify-content: space-around;
    }

    .control-btn {
        font-size: 14px;
        padding: 6px;
        min-width: 28px;
        min-height: 28px;
    }

    .reset-records-btn,
    .close-records-btn {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .reset-records-btn {
        font-size: 16px;
    }

    .header-buttons {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .records-header h1 {
        font-size: 18px;
    }

    .record-title {
        font-size: 16px;
    }

    .song-image {
        height: 100px;
    }

    .song-controls {
        gap: 6px;
    }

    .control-btn {
        font-size: 13px;
        padding: 5px;
        min-width: 26px;
        min-height: 26px;
    }

    .records-container {
        padding: 10px 8px;
    }

    .record-card {
        padding: 12px;
    }

    .clip-id-value {
        font-size: 11px;
        padding: 5px 6px;
    }

    .clip-id-label {
        gap: 6px;
    }

    .clip-copy-btn {
        min-width: 18px;
        min-height: 18px;
        padding: 2px;
        font-size: 10px;
        background: none !important;
    }
}

/* Scrollbar styling */
.records-container::-webkit-scrollbar,
.lyrics-content::-webkit-scrollbar {
    width: 6px;
}

.records-container::-webkit-scrollbar-track,
.lyrics-content::-webkit-scrollbar-track {
    background: rgba(138, 43, 226, 0.1);
    border-radius: 3px;
}

.records-container::-webkit-scrollbar-thumb,
.lyrics-content::-webkit-scrollbar-thumb {
    background: #8A2BE2;
    border-radius: 3px;
}

.records-container::-webkit-scrollbar-thumb:hover,
.lyrics-content::-webkit-scrollbar-thumb:hover {
    background: #9A3BF2;
}

/* Tooltip removal for better mobile experience */
@media (hover: none) {
    .control-btn::after {
        display: none;
    }
}

/* New Stems Processing Button Styles */
.fadr-btn {
    background: linear-gradient(45deg, #6200ea, #9d46ff) !important;
    border: 1px solid #9d46ff !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(157, 70, 255, 0.3);
}

.fadr-btn:hover {
    background: linear-gradient(45deg, #9d46ff, #6200ea) !important;
    box-shadow: 0 4px 12px rgba(157, 70, 255, 0.4) !important;
    transform: translateY(-1px) !important;
}

.stems-basic-btn {
    background: linear-gradient(45deg, #4caf50, #66bb6a) !important;
    border: 1px solid #4caf50 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.stems-basic-btn:hover {
    background: linear-gradient(45deg, #66bb6a, #4caf50) !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4) !important;
    transform: translateY(-1px) !important;
}

.stems-full-btn {
    background: linear-gradient(45deg, #ff9800, #ffb74d) !important;
    border: 1px solid #ff9800 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.stems-full-btn:hover {
    background: linear-gradient(45deg, #ffb74d, #ff9800) !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4) !important;
    transform: translateY(-1px) !important;
}

.extend-btn {
    background: linear-gradient(45deg, #00bcd4, #26c6da) !important;
    border: 1px solid #00bcd4 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.extend-btn:hover {
    background: linear-gradient(45deg, #26c6da, #00bcd4) !important;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.4) !important;
    transform: translateY(-1px) !important;
}