* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.recorder-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.recorder-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.visualizer-container {
    background: #1a1a2e;
    border-radius: 10px;
    height: 150px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

canvas {
    width: 100%;
    height: 100%;
}

.time-display {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1.5rem;
    font-family: 'Courier New', monospace;
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-record {
    background: #ff4757;
    color: white;
}

.btn-record:hover {
    background: #ff3838;
}

.btn-record.recording {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.btn-stop {
    background: #2d3436;
    color: white;
}

.btn-pause {
    background: #fdcb6e;
    color: #2d3436;
}

.btn-resume {
    background: #00b894;
    color: white;
}

.status {
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
    color: #667eea;
}

.recordings-section {
    margin-top: 2rem;
}

.recordings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recordings-header h2 {
    color: #667eea;
}

.clear-all-btn {
    background: #ff4757;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.recordings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recording-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recording-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recording-name {
    font-weight: bold;
    color: #2d3436;
}

.recording-duration {
    color: #666;
    font-size: 0.9rem;
}

.recording-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.recording-controls button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.play-btn {
    background: #00b894;
    color: white;
}

.download-btn {
    background: #0984e3;
    color: white;
}

.delete-btn {
    background: #ff4757;
    color: white;
}

audio {
    width: 100%;
    height: 40px;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 2rem;
}

footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .recorder-card {
        padding: 2rem 1.5rem;
    }
    .controls {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
}

.permission-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}