/* Voice Recorder App - Standalone Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    margin: 0;
    padding: 0;
}

/* App Container */
.voice-app-container {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

/* Left Sidebar */
.voice-sidebar {
    width: 320px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 24px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    overflow: visible; /* No scrollbar on sidebar */
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Allow sidebar to grow naturally */
}

.voice-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Brand Section */
.voice-brand {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.voice-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.voice-brand-link:hover {
    color: #3b82f6;
    transform: translateY(-1px);
}

.voice-brand-logo {
    height: 32px;
    width: auto;
}

.voice-brand-text {
    font-size: 16px;
    font-weight: 600;
}

.voice-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.voice-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.voice-logo-text {
    font-size: 20px;
    font-weight: 700;
}

/* Recorder Controls in Sidebar */
.voice-recorder-controls {
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
    flex-shrink: 0; /* Prevent shrinking */
}

.voice-recorder-status {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.voice-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.voice-status-icon.ready {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.voice-status-icon.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.voice-status-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.voice-status-time {
    font-size: 32px;
    font-weight: 700;
    color: #3b82f6;
    margin: 16px 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.voice-level-indicator {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 16px 0;
}

.voice-level-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #fbbf24 50%, #ef4444 100%);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 3px;
}

.voice-record-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.voice-record-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.4);
}

.voice-record-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.voice-record-button.recording {
    background: linear-gradient(135deg, #64748b, #475569);
}

.voice-control-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.voice-control-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.voice-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.voice-recording-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-top: 16px;
}

/* Permission/Processing/Success States */
.voice-permission-state {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.voice-permission-icon {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.voice-permission-state h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.voice-permission-state p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.voice-permission-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.voice-permission-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.voice-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.voice-success-icon {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 16px;
}

.voice-success-details {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    text-align: left;
}

.voice-url-section {
    margin: 16px 0;
}

.voice-url-display {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.voice-url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.voice-copy-btn {
    padding: 8px 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-copy-btn:hover {
    background: #059669;
}

/* Navigation */
.voice-nav-menu {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    flex-shrink: 0; /* Prevent shrinking */
}

.voice-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.voice-nav-item:hover,
.voice-nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.voice-nav-item.active {
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.voice-nav-icon {
    width: 20px;
    text-align: center;
}

/* Bottom Navigation */
.voice-bottom-nav {
    position: relative;
    z-index: 1;
    margin-top: auto; /* Push to bottom */
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0; /* Prevent shrinking */
}

/* Main Content */
.voice-main-content {
    flex: 1;
    padding: 32px;
    min-height: 100vh; /* Allow main content to grow naturally */
}

.voice-content-header {
    margin-bottom: 32px;
}

.voice-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.voice-page-subtitle {
    font-size: 16px;
    color: #64748b;
}

/* Content Cards */
.voice-content-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.voice-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Recordings List */
.voice-recordings-list {
    display: grid;
    gap: 16px;
}

.voice-recording-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.voice-recording-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.voice-recording-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.voice-recording-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.voice-recording-meta {
    font-size: 14px;
    color: #64748b;
    display: flex;
    gap: 16px;
}

.voice-recording-actions {
    display: flex;
    gap: 8px;
}

.voice-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.voice-action-btn.play {
    background: #10b981;
    color: white;
}

.voice-action-btn.download {
    background: #3b82f6;
    color: white;
}

.voice-action-btn.share {
    background: #8b5cf6;
    color: white;
}

.voice-action-btn.delete {
    background: #ef4444;
    color: white;
}

.voice-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.voice-audio-player {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.voice-audio-control {
    width: 100%;
    height: 40px;
}

/* Features Grid */
.voice-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.voice-feature-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.voice-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.voice-feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.voice-feature-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.voice-feature-icon.green {
    background: linear-gradient(135deg, #10b981, #047857);
}

.voice-feature-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.voice-feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.voice-feature-card p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

/* Empty State */
.voice-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
}

.voice-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .voice-app-container {
        flex-direction: column;
    }

    .voice-sidebar {
        width: 100%;
        min-height: auto;
        padding: 16px;
    }

    .voice-main-content {
        min-height: auto;
        padding: 16px;
    }

    .voice-features-grid {
        grid-template-columns: 1fr;
    }

    .voice-recording-header {
        flex-direction: column;
        gap: 12px;
    }

    .voice-recording-actions {
        justify-content: center;
    }

    .voice-recording-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .voice-url-display {
        flex-direction: column;
        gap: 12px;
    }

    .voice-url-input {
        text-align: center;
    }

    .voice-control-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .voice-status-time {
        font-size: 28px;
    }

    .voice-record-button {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }

    .voice-page-title {
        font-size: 24px;
    }

    .voice-content-card {
        padding: 16px;
    }

    .voice-brand-text {
        font-size: 14px;
    }

    .voice-brand-logo {
        height: 28px;
    }
}

@media (max-width: 576px) {
    .voice-sidebar {
        padding: 12px;
    }

    .voice-main-content {
        padding: 12px;
    }

    .voice-recorder-status {
        padding: 16px;
    }

    .voice-permission-state {
        padding: 16px;
    }

    .voice-recording-meta {
        font-size: 12px;
        gap: 8px;
    }

    .voice-action-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Utility classes */
.me-2 {
    margin-right: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* Content section visibility */
.voice-content-section {
    display: block;
}