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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: #f1f5f9;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: #1e293b;
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid #334155;
    max-width: 450px;
    width: 100%;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(129, 140, 248, 0.3));
}

.login-card h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #818cf8 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card p {
    color: #94a3b8;
    margin-bottom: 40px;
    line-height: 1.6;
}

.discord-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.discord-login-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.5);
}

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.dashboard-header {
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #334155;
    padding: 20px 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    height: 36px;
    width: auto;
    border-radius: 6px;
}

.header-content h1 {
    background: linear-gradient(135deg, #818cf8 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #f1f5f9;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #4f46e5;
}

.logout-btn {
    background: #ef4444;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.dashboard-main {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.dashboard-content {
    background: #1e293b;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid #334155;
}

.dashboard-content h2 {
    color: #f1f5f9;
    margin-bottom: 10px;
    font-size: 2em;
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 30px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.member-card {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid #334155;
}

.member-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

.member-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #4f46e5;
}

.member-info {
    flex: 1;
}

.member-info h3 {
    color: #f1f5f9;
    margin-bottom: 5px;
}

.member-username {
    color: #94a3b8;
    font-size: 0.9em;
}

.manage-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.manage-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1e293b;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #334155;
}

.modal-header h2 {
    color: #f1f5f9;
    font-size: 1.5em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    width: 40px;
    height: 40px;
}

.close-btn:hover {
    color: #f1f5f9;
}

.modal-body {
    padding: 25px;
}

.current-sounds {
    background: rgba(15, 23, 42, 0.5);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #334155;
    margin-bottom: 25px;
}

.current-sounds h3 {
    color: #f1f5f9;
    margin-bottom: 15px;
}

.sound-info {
    padding: 8px 0;
    color: #94a3b8;
}

.sound-info strong {
    color: #f1f5f9;
}

.sound-section {
    margin-bottom: 25px;
}

.sound-section h3 {
    color: #f1f5f9;
    margin-bottom: 12px;
}

.sound-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #334155;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    background: #0f172a;
    color: #f1f5f9;
}

.sound-select:focus {
    outline: none;
    border-color: #4f46e5;
}

.save-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.save-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.sound-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.clear-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.clear-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
    display: block;
}

.status-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
    display: block;
}

/* User Dashboard Specific Styles */
.user-profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
}

.profile-info h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.profile-username {
    opacity: 0.9;
}

.sound-management {
    max-width: 600px;
    margin: 0 auto;
}

.current-sound-display {
    background: rgba(15, 23, 42, 0.5);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #334155;
    margin-bottom: 25px;
    text-align: center;
}

.current-sound-display h3 {
    color: #f1f5f9;
    margin-bottom: 10px;
}

.current-sound-name {
    font-size: 1.3em;
    color: #818cf8;
    font-weight: 600;
}

.sound-selector-section {
    margin-bottom: 30px;
}

.sound-selector-section h3 {
    color: #f1f5f9;
    margin-bottom: 15px;
}

.info-box {
    background: rgba(79, 70, 229, 0.1);
    border-left: 4px solid #4f46e5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.info-box h4 {
    color: #f1f5f9;
    margin-bottom: 15px;
}

.info-box ul {
    margin-left: 20px;
    color: #94a3b8;
    line-height: 1.8;
}

.info-box li {
    margin-bottom: 8px;
}

/* Admin Link */
.admin-link {
    background: rgba(79, 70, 229, 0.2);
    color: #818cf8;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.admin-link:hover {
    background: rgba(79, 70, 229, 0.3);
    border-color: #4f46e5;
    color: #a5b4fc;
    transform: translateY(-2px);
}

/* Logs Page Styles */
.logs-container {
    overflow-x: auto;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #334155;
}

.logs-table thead {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.logs-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.logs-table td {
    padding: 15px;
    border-bottom: 1px solid #334155;
}

.logs-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.1);
}

.logs-table tbody tr:last-child td {
    border-bottom: none;
}

.log-timestamp {
    color: #94a3b8;
    font-size: 0.9em;
    white-space: nowrap;
}

.log-user {
    font-weight: 600;
    color: #f1f5f9;
}

.action-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.log-target {
    color: #818cf8;
    font-weight: 500;
}

.log-details {
    color: #94a3b8;
}

.log-details strong {
    color: #f1f5f9;
    text-transform: capitalize;
}

/* Upload Section Styles */
.upload-section {
    background: rgba(15, 23, 42, 0.5);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #334155;
    margin-top: 30px;
}

.upload-warning {
    background: rgba(251, 191, 36, 0.1);
    border-left: 4px solid #fbbf24;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.9em;
    line-height: 1.6;
}

.upload-warning strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1em;
    color: #fcd34d;
}

.sound-type-selector {
    margin-bottom: 20px;
}

.sound-type-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #f1f5f9;
}

.upload-dropzone {
    border: 3px dashed #334155;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.5);
}

.upload-dropzone:hover {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
}

.upload-dropzone.dragover {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.2);
    transform: scale(1.02);
}

.dropzone-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.dropzone-text {
    font-size: 1.2em;
    color: #f1f5f9;
    margin-bottom: 8px;
    font-weight: 600;
}

.dropzone-subtext {
    color: #94a3b8;
    font-size: 0.9em;
}

.file-preview {
    background: rgba(30, 41, 59, 0.5);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #4f46e5;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-header strong {
    color: #f1f5f9;
    font-size: 1.1em;
}

.remove-file-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.remove-file-btn:hover {
    background: #dc2626;
    transform: rotate(90deg);
}

.file-name-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #334155;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
    background: #0f172a;
    color: #f1f5f9;
}

.file-name-input:focus {
    outline: none;
    border-color: #4f46e5;
}

.file-hint {
    color: #94a3b8;
    font-size: 0.9em;
    margin-bottom: 20px;
    text-align: center;
}

.file-hint span {
    color: #818cf8;
    font-weight: 600;
}

.upload-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.trim-file-btn {
    flex: 1;
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
    border: 2px solid #ec4899;
    padding: 15px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.trim-file-btn:hover {
    background: rgba(236, 72, 153, 0.3);
    border-color: #db2777;
    color: #db2777;
    transform: translateY(-2px);
}

.upload-btn {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 15px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.upload-btn:disabled {
    background: #64748b;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

@media (max-width: 768px) {
    .upload-actions {
        flex-direction: column;
    }
}

/* Audio Trimmer Styles */
.trimmer-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.trimmer-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.trimmer-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trimmer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 10px;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.trimmer-title {
    font-size: 1.3em;
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trimmer-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
    border-left: 1px solid #334155;
    padding-left: 16px;
}

.back-link:hover {
    color: #f1f5f9;
}

.trimmer-main {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Source Panel (always visible) */
.source-panel {
    width: 100%;
    max-width: 1400px;
    margin-bottom: 24px;
}

.source-panel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.upload-card {
    width: 100%;
    border: 2px dashed #334155;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-card:hover,
.upload-card.dragover {
    border-color: #4f46e5;
    background: rgba(30, 41, 59, 0.8);
    transform: scale(1.02);
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2em;
    transition: all 0.3s ease;
}

.upload-card:hover .upload-icon-wrapper {
    background: #4f46e5;
    transform: scale(1.1);
}

.upload-card.compact {
    padding: 30px 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.upload-card.compact .upload-icon-wrapper {
    width: 50px;
    height: 50px;
    font-size: 1.4em;
    margin-bottom: 12px;
}

.upload-card.compact .upload-title {
    font-size: 1.3em;
    margin-bottom: 8px;
}

.upload-card.compact .upload-subtitle {
    font-size: 0.85em;
    margin-bottom: 16px;
}

.upload-button.compact {
    padding: 10px 28px;
    font-size: 0.95em;
}

/* Server Song Picker */
.server-song-picker {
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 180px;
}

.picker-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 16px;
    text-align: center;
}

.picker-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.picker-controls .sound-select {
    margin-bottom: 0;
}

.picker-controls .control-btn {
    align-self: stretch;
    justify-content: center;
    margin-top: 4px;
}

.upload-title {
    font-size: 2em;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 12px;
}

.upload-subtitle {
    color: #94a3b8;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.upload-button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 16px 48px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.upload-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.5);
}

.engine-status {
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9em;
}

.status-icon {
    color: #10b981;
}

/* Editor Section */
#editorSection {
    width: 100%;
    max-width: 1400px;
}

.info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e293b;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #334155;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-icon {
    padding: 12px;
    background: rgba(79, 70, 229, 0.2);
    border-radius: 12px;
    color: #818cf8;
    font-size: 1.5em;
}

.file-details h2 {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 0.85em;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
}

.selection-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0f172a;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #334155;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
    color: #94a3b8;
}

.selection-time {
    color: #818cf8;
}

.selection-time.end {
    color: #ec4899;
}

/* Selection Mode Buttons */
.selection-mode-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.selection-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.selection-mode-btn:hover {
    border-color: #4f46e5;
    color: #f1f5f9;
}

.selection-mode-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.selection-mode-btn .mode-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
    transition: background 0.2s ease;
}

.selection-mode-btn.active .mode-indicator {
    background: #a5b4fc;
    box-shadow: 0 0 6px rgba(165, 180, 252, 0.6);
}

/* Visualizer */
.visualizer-container {
    background: #1e293b;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #334155;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    margin-bottom: 24px;
}

#loadingOverlay {
    position: absolute;
    inset: 0;
    background: #1e293b;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    border-radius: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 4px solid #4f46e5;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: #818cf8;
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.controls-bar {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-group {
    display: flex;
    align-items: center;
    background: #0f172a;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #334155;
}

.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #1e293b;
    color: #f1f5f9;
}

.control-btn.primary {
    background: #4f46e5;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.control-btn.primary:hover {
    background: #4338ca;
}

.control-btn.danger {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.control-btn.danger:hover {
    background: #dc2626;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0f172a;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #334155;
}

.zoom-btn {
    padding: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: #1e293b;
    color: #f1f5f9;
}

.zoom-btn.fit {
    font-size: 0.75em;
    padding: 6px 10px;
    margin-left: 4px;
    border-left: 1px solid #334155;
}

.zoom-value {
    font-size: 0.85em;
    color: #64748b;
    width: 48px;
    text-align: center;
    user-select: none;
}

.action-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.trim-info {
    text-align: right;
}

.trim-info-label {
    font-size: 0.75em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.trim-info-value {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    color: #f1f5f9;
}

.trim-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 16px;
    border: none;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
    min-width: 180px;
    justify-content: center;
}

.trim-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.5);
}

.trim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Instructions */
.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.instruction-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.instruction-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.instruction-icon {
    font-size: 1.3em;
}

.instruction-title {
    font-weight: 600;
    color: #f1f5f9;
}

.instruction-desc {
    font-size: 0.9em;
    color: #94a3b8;
    line-height: 1.6;
}

/* Footer */
.trimmer-footer {
    padding: 24px;
    text-align: center;
    color: #64748b;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }

    .members-grid {
        grid-template-columns: 1fr;
    }

    .member-card {
        flex-direction: column;
        text-align: center;
    }

    .manage-btn {
        width: 100%;
    }

    .user-profile-card {
        flex-direction: column;
        text-align: center;
    }

    .logs-table {
        font-size: 0.85em;
    }

    .logs-table th,
    .logs-table td {
        padding: 10px 8px;
    }

    .trimmer-title {
        display: none;
    }

    .source-panel-row {
        grid-template-columns: 1fr;
    }

    .info-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .selection-info {
        width: 100%;
        flex-wrap: wrap;
    }

    .controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .playback-controls {
        flex-direction: column;
        gap: 8px;
    }

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

    .trim-info {
        text-align: center;
    }

    .upload-card {
        padding: 60px 20px;
    }
}
