.page {
    display: flex;
    min-height: 100vh;
}


/* General Layout */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f7fa;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Blazor Loading */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #667eea;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #764ba2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Recording Controls */
.recording-button {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

    .recording-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }

    .recording-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-dark {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: white;
}

/* Audio Visualizer */
.audio-visualizer {
    width: 100%;
    min-height: 120px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 20px 0;
}

.visualizer-bar {
    width: 6px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: height 0.1s ease;
    min-height: 10px;
}

/* Recording Timer */
.recording-timer {
    font-size: 3rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #f5576c;
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.progress-container {
    margin: 20px 0;
}

.progress {
    height: 30px;
    border-radius: 15px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 0.3s ease;
}

.progress-message {
    text-align: center;
    margin-top: 10px;
    color: #6c757d;
    font-size: 14px;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

    .card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 15px 20px;
    border-radius: 0 0 15px 15px;
}

/* Recording Item */
.recording-item {
    transition: transform 0.2s ease;
}

    .recording-item:hover {
        transform: translateY(-2px);
    }

/* Audio Player Styling */
audio {
    width: 100%;
    height: 40px;
    border-radius: 8px;
}

.audio-player-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

    .badge.bg-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }

    .badge.bg-success {
        background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%) !important;
    }

    .badge.bg-info {
        background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%) !important;
    }

    .badge.bg-warning {
        background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%) !important;
    }

    .badge.bg-danger {
        background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
    }

    .badge.bg-secondary {
        background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%) !important;
    }

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

    .btn-outline-primary:hover {
        background: #667eea;
        color: white;
    }

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

    .btn-outline-secondary:hover {
        background: #6c757d;
        color: white;
    }

.btn-outline-danger {
    border: 2px solid #dc3545;
    color: #dc3545;
    background: transparent;
}

    .btn-outline-danger:hover {
        background: #dc3545;
        color: white;
    }

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Forms */
.form-control, .form-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        outline: none;
    }

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 8px;
}

.page-item .page-link {
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-item .page-link:hover:not(.disabled) {
    background: #f8f9fa;
    border-color: #667eea;
}

/* Spinner */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.spinner-grow {
    width: 2rem;
    height: 2rem;
    background-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: spinner-grow 0.75s linear infinite;
}

@keyframes spinner-grow {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

/* Text Colors */
.text-primary {
    color: #667eea !important;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-secondary {
    color: #6c757d !important;
}

/* Background Colors */
.bg-light {
    background-color: #f8f9fa !important;
}

.bg-dark {
    background-color: #343a40 !important;
}

.bg-primary {
    background-color: #667eea !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

/* Utilities */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.rounded {
    border-radius: 0.25rem !important;
}

.border {
    border: 1px solid #dee2e6 !important;
}

.border-primary {
    border-color: #667eea !important;
}

.border-2 {
    border-width: 2px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .recording-timer {
        font-size: 2rem;
    }

    .audio-visualizer {
        min-height: 80px;
        gap: 2px;
    }

    .visualizer-bar {
        width: 4px;
    }

    .card-header, .card-body, .card-footer {
        padding: 12px 15px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #5568d3 0%, #654a8d 100%);
    }

/* NavMenu Styling */
.sidebar { background: white; box-shadow: 2px 0 8px rgba(0,0,0,0.08); }
.top-row { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; height: 3.5rem; }
.navbar-brand { font-size: 1.3rem; font-weight: 700; color: white !important; }
.nav-item a { color: #333; border-radius: 8px; padding: 0 1rem; margin: 0 0.5rem; }
.nav-item a:hover { background: rgba(102,126,234,0.1); color: #667eea; }
.nav-item a.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
