 body {
    max-width: 100vw;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-content {
    padding-bottom: 90px;
}

/* Tab Navigation */
.tab-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.95), rgba(20, 20, 30, 0.95));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    padding: 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.tab-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.tab:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.tab:hover:before {
    opacity: 1;
}

.tab.active {
    color: #ffffff;
    transform: translateY(-2px);
}

.tab.active:before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.3), rgba(0, 123, 255, 0.15));
}

.tab-icon {
    font-size: 16px;
    margin-bottom: 2px;
}

.tab-label {
    font-size: 9px;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
}

/* Content Areas */
.overlay-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 90px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(20, 20, 40, 0.95));
    backdrop-filter: blur(20px);
    z-index: 80;
    overflow-y: auto;
    padding: 20px;
    display: none;
}

.overlay-content.active {
    display: block;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.overlay-header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.overlay-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.overlay-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

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

/* Control Panels */
.control-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.control-panel h3 {
    color: white;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Buttons */
.btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    backdrop-filter: blur(10px);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.btn-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.btn-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
}

/* Input fields */
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 14px;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
    outline: none;
    border-color: rgba(0, 123, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.form-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

/* Sliders */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    margin: 15px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #007bff, #0056b3);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #007bff, #0056b3);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

/* Color picker */
.color-picker {
    width: 100%;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Status Messages */
.status-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 150;
    max-width: 400px;
    pointer-events: none;
}

.status-message {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 30, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
}

.status-message.show {
    opacity: 1;
    transform: translateX(0);
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.status-message.success {
    color: #4CAF50;
    border-left: 4px solid #4CAF50;
}

.status-message.error {
    color: #F44336;
    border-left: 4px solid #F44336;
}

.status-message.info {
    color: #2196F3;
    border-left: 4px solid #2196F3;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 30, 0.8));
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 30px 40px;
    display: none;
    text-align: center;
    color: white;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #09f;
    animation: spin 1s ease infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-label {
        font-size: 8px;
    }
    
    .tab-icon {
        font-size: 14px;
    }
    
    .overlay-content {
        padding: 15px;
    }
    
    .control-panel {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .btn-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Header */
.header {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 40, 0.8));
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    margin: 0;
    font-size: 28px;
    background: linear-gradient(45deg, #007bff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Audio file styling */
.audio-files-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.audio-file-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.audio-file-item:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    transform: translateY(-1px);
}

.audio-file-info {
    flex: 1;
    min-width: 0;
}

.audio-file-name {
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-file-delay {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.audio-delay-badge {
    background: linear-gradient(145deg, rgba(0, 123, 255, 0.3), rgba(0, 123, 255, 0.2));
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    margin-right: 8px;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

/* Main dashboard area */
.dashboard-main {
    padding: 20px;
    min-height: calc(100vh - 90px);
}

.welcome-panel {
    background: linear-gradient(145deg, rgba(0, 123, 255, 0.2), rgba(0, 123, 255, 0.1));
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
}

.welcome-panel h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    background: linear-gradient(45deg, #007bff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-panel p {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quick-action-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.quick-action-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.quick-action-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.quick-action-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.quick-action-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.audio-play-btn:disabled {
background: linear-gradient(145deg, rgba(255, 165, 0, 0.4), rgba(255, 165, 0, 0.2));
    border-color: rgba(255, 165, 0, 0.5);
    color: rgba(255, 255, 255, 0.8);
}

.audio-stop-btn:not(:disabled) {
    background: linear-gradient(145deg, rgba(244, 67, 54, 0.4), rgba(244, 67, 54, 0.2));
    border-color: rgba(244, 67, 54, 0.5);
    color: #ffffff;
}

.audio-stop-btn:not(:disabled):hover {
    background: linear-gradient(145deg, rgba(244, 67, 54, 0.6), rgba(244, 67, 54, 0.4));
    transform: translateY(-2px);
}