:root {
    --primary: #ff0000;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

header p {
    color: #aaa;
    font-size: 1.1rem;
}

.input-section {
    background: rgba(30, 30, 30, 0.9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 2px solid #444;
    border-radius: 10px;
    background: #222;
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.3);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.btn-primary:hover {
    background: #e60000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.loading {
    display: none;
    text-align: center;
    padding: 15px;
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 10px;
}

.player-container {
    display: none;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.player-wrapper {
    background: rgba(20, 20, 20, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    position: relative;
}

#player {
    width: 100%;
    display: block;
    background: #000;
}

.player-controls {
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.control-btn i {
    font-size: 16px;
}

.time-display {
    color: #ccc;
    font-family: monospace;
    font-size: 14px;
    min-width: 90px;
    text-align: center;
}

.seek-bar {
    flex: 1;
    height: 6px;
    background: #444;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: transform 0.2s;
}

.seek-bar::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-bar {
    width: 80px;
    height: 5px;
}

.playlist {
    background: rgba(30, 30, 30, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    height: fit-content;
    max-height: 70vh;
    overflow-y: auto;
}

.playlist h2 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(40, 40, 40, 0.7);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.playlist-item:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: translateX(5px);
}

.playlist-item.active {
    background: rgba(255, 0, 0, 0.3);
    border-left: 4px solid var(--primary);
}

.playlist-item i {
    color: var(--gray);
    font-size: 18px;
}

.playlist-item.active i {
    color: var(--primary);
}

.playlist-title {
    font-weight: 500;
    flex: 1;
}

.playlist-duration {
    color: var(--gray);
    font-size: 14px;
    min-width: 60px;
    text-align: right;
}

@media (max-width: 900px) {
    .player-container {
        grid-template-columns: 1fr;
    }
    
    .playlist {
        max-height: 300px;
    }
}