* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pure-black: #0a0e27;
    --dark-grey: #1a1f3a;
    --medium-grey: #252b48;
    --light-grey: #2f3856;
    --silver: #4a5568;
    --ash: #6b7280;
    --pale-grey: #9ba4b4;
    --off-white: #e8e8e8;
    --pure-white: #ffffff;
    --navy-dark: #1a1f3a;
    --navy-medium: #252b48;
    --navy-light: #2f3856;
    --cyan-accent: #00bcd4;
    --blue-accent: #2196f3;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #252b48 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    position: relative;
    display: flex;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #0a0e27;
    border-right: 1px solid #2f3856;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #2f3856;
}

.sidebar-toggle {
    font-size: 1.2rem;
    color: #9ba4b4;
    cursor: pointer;
    transition: color 0.3s;
}

.sidebar-toggle:hover {
    color: #00bcd4;
}

.sidebar-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.sidebar-search {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(47, 56, 86, 0.5);
    margin: 15px;
    border-radius: 8px;
}

.sidebar-search i {
    color: #9ba4b4;
    font-size: 0.9rem;
}

.sidebar-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e8e8e8;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}

.sidebar-search input::placeholder {
    color: #6b7280;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: #9ba4b4;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: rgba(47, 56, 86, 0.5);
    color: #ffffff;
}

.sidebar-item.active {
    background: rgba(0, 188, 212, 0.15);
    color: #00bcd4;
    border-left-color: #00bcd4;
}

.sidebar-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 10px 0;
    border-top: 1px solid #2f3856;
}

.sidebar-nav::-webkit-scrollbar,
.sidebar-footer::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #2f3856;
    border-radius: 2px;
}

.container {
    max-width: calc(100% - 320px);
    margin-left: 280px;
    margin-right: 40px;
    width: auto;
    background: #1a1f3a;
    border-radius: 0;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.header {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid #2f3856;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    border-radius: 50%;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.header h1 i {
    color: var(--pale-grey);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    font-size: 0.8em;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
    color: var(--pale-grey);
    letter-spacing: 0.5px;
}

.header-btn {
    background: var(--medium-grey);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid var(--light-grey);
}

.header-btn:hover {
    background: var(--light-grey);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
    border-color: var(--silver);
}

.header-btn i {
    font-size: 0.9rem;
}

#unselectPatientBtn:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-50%) scale(1.1);
}

.main-content {
    padding: 2.5rem;
    background: #252b48;
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.upload-box {
    border: 3px dashed var(--ocean-blue);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 180, 216, 0.2), transparent);
    transition: left 0.5s;
}

.upload-box:hover::before {
    left: 100%;
}

.upload-box:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-8px);
    border-color: var(--sky-blue);
    box-shadow: 0 15px 40px rgba(0, 119, 182, 0.2);
}

.upload-icon {
    font-size: 4.5rem;
    color: var(--ocean-blue);
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 119, 182, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-box h3 {
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.upload-box p {
    color: #000000;
    font-weight: 500;
}

.formats {
    color: #000000;
    font-size: 0.85rem;
    margin: 1rem 0;
    font-weight: 400;
    opacity: 0.7;
}

.browse-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--medium-grey), var(--light-grey));
    color: #000000;
    padding: 14px 35px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--silver);
}

.browse-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, var(--light-grey), var(--silver));
}

#audioFile {
    display: none;
}

.recording-section {
    padding: 2rem;
    border-radius: 20px;
    background: rgba(47, 56, 86, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 188, 212, 0.3);
}

.recording-section h3 {
    color: #9ba4b4;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.recording-controls {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.record-btn, .stop-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.record-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    color: #000000;
    border: 2px solid #000000;
}

.record-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-color: #333333;
}

.record-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stop-btn {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #ffffff;
    border: 2px solid #333333;
}

.stop-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-color: #4a4a4a;
}

.stop-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stop-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: #333333;
    border-color: #555555;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d32f2f;
    font-weight: 600;
    margin-top: 1rem;
    padding: 0.5rem;
}

.pulse {
    width: 14px;
    height: 14px;
    background: #d32f2f;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.5);
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 10px rgba(211, 47, 47, 0.5); }
    50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 20px rgba(211, 47, 47, 0.8); }
    100% { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 10px rgba(211, 47, 47, 0.5); }
}

.controls-section {
    background: rgba(47, 56, 86, 0.7);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2.5rem;
    border: 2px solid rgba(0, 188, 212, 0.3);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #9ba4b4;
    font-size: 1.05rem;
}

.control-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid #3d4663;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #1a1f3a;
    color: #e8e8e8;
    font-weight: 500;
}

.control-group select:focus {
    border-color: #00bcd4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-buttons button {
    flex: 1;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 188, 212, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #2f3856 0%, #252b48 100%);
    color: #e8e8e8;
    border: 2px solid #3d4663;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 188, 212, 0.2);
    border-color: #00bcd4;
}

.btn-clear {
    background: rgba(47, 56, 86, 0.8);
    color: #e8e8e8;
    border: 2px solid #3d4663;
}

.btn-clear:hover {
    background: rgba(47, 56, 86, 1);
    transform: translateY(-2px);
    border-color: #00bcd4;
}

.results-section {
    margin-bottom: 2.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-header h3 {
    color: var(--navy-blue);
    font-size: 1.6rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
}

.btn-action {
    padding: 8px 16px;
    background: rgba(47, 56, 86, 0.8);
    border: 2px solid #3d4663;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e8e8e8;
}

.btn-action:hover {
    background: rgba(0, 188, 212, 0.8);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.25);
    border-color: #00bcd4;
}

.loading-container {
    display: none;
    text-align: center;
    padding: 3.5rem;
    background: rgba(47, 56, 86, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 2px solid rgba(0, 188, 212, 0.3);
}

.loading-container p {
    color: #9ba4b4;
    font-weight: 500;
    font-size: 1.1rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(202, 240, 248, 0.3);
    border-top: 6px solid var(--ocean-blue);
    border-right: 6px solid var(--sky-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.results-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.result-card {
    background: rgba(47, 56, 86, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 2px solid rgba(0, 188, 212, 0.3);
    transition: all 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.result-header {
    background: linear-gradient(135deg, #1a1f3a 0%, #00bcd4 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.badge {
    background: rgba(0, 188, 212, 0.3);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 188, 212, 0.5);
    color: white;
    font-weight: 500;
}

.result-content {
    padding: 1.5rem;
}

.result-content textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid #3d4663;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    background: rgba(26, 31, 58, 0.6);
    color: #e8e8e8;
    transition: all 0.3s;
}

.result-content textarea:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2);
    background: rgba(26, 31, 58, 0.8);
}

.segments-container {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Conversation Container */
.conversation-container {
    padding: 1.5rem;
    max-height: 350px;
    overflow-y: auto;
}

.conversation-container::-webkit-scrollbar {
    width: 8px;
}

.conversation-container::-webkit-scrollbar-track {
    background: rgba(202, 240, 248, 0.2);
    border-radius: 10px;
}

.conversation-container::-webkit-scrollbar-thumb {
    background: var(--sky-blue);
    border-radius: 10px;
}

.conversation-turn {
    display: flex;
    margin-bottom: 1.5rem;
    animation: slideIn 0.4s ease-out;
}

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

.conversation-turn.doctor {
    justify-content: flex-start;
}

.conversation-turn.patient {
    justify-content: flex-end;
}

.speaker-bubble {
    max-width: 75%;
    padding: 0.9rem 1.2rem;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.speaker-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.conversation-turn.doctor .speaker-bubble {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    color: white;
    border-bottom-left-radius: 5px;
}

.conversation-turn.patient .speaker-bubble {
    background: linear-gradient(135deg, #2f3856 0%, #252b48 100%);
    color: #e8e8e8;
    border-bottom-right-radius: 5px;
}

.speaker-label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conversation-turn.doctor .speaker-label {
    color: #ffffff;
}

.conversation-turn.patient .speaker-label {
    color: #e8e8e8;
}

.speaker-label i {
    font-size: 1rem;
}

.speaker-text {
    line-height: 1.7;
    font-size: 0.95rem;
    color: inherit;
}

.speaker-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-weight: 500;
}

.segments-container::-webkit-scrollbar {
    width: 8px;
}

.segments-container::-webkit-scrollbar-track {
    background: rgba(202, 240, 248, 0.2);
    border-radius: 10px;
}

.segments-container::-webkit-scrollbar-thumb {
    background: var(--sky-blue);
    border-radius: 10px;
}

.segment-item {
    background: rgba(47, 56, 86, 0.3);
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border-left: 4px solid #00bcd4;
    transition: all 0.3s;
}

.segment-item:hover {
    background: rgba(47, 56, 86, 0.5);
    transform: translateX(5px);
}

.segment-time {
    font-size: 0.85rem;
    color: #00bcd4;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.segment-item p {
    color: #e8e8e8;
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    color: #00bcd4;
    font-style: italic;
    padding: 2rem;
    opacity: 0.7;
}

/* SOAP Notes Styling */
.soap-action {
    padding: 1rem 1.5rem;
    border-top: 2px solid rgba(0, 180, 216, 0.2);
    text-align: center;
}

.btn-soap {
    background: linear-gradient(135deg, var(--ocean-blue) 0%, var(--sky-blue) 100%);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
}

.btn-soap:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 119, 182, 0.4);
}

.btn-soap:active {
    transform: translateY(0);
}

.btn-soap i {
    margin-right: 0.5rem;
}

.soap-container {
    padding: 1.5rem;
}

.soap-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(26, 31, 58, 0.4);
    border-radius: 12px;
    border-left: 4px solid #00bcd4;
    transition: all 0.3s;
}

.soap-section:hover {
    background: rgba(26, 31, 58, 0.6);
    transform: translateX(5px);
}

.soap-section:last-child {
    margin-bottom: 0;
}

.soap-section h5 {
    color: #e8e8e8;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.soap-section h5 i {
    color: #00bcd4;
}

.soap-content {
    color: #9ba4b4;
    line-height: 1.8;
    font-size: 0.95rem;
}

.soap-section:nth-child(1) {
    border-left-color: #03045e;
}

.soap-section:nth-child(2) {
    border-left-color: #0077b6;
}

.soap-section:nth-child(3) {
    border-left-color: #00b4d8;
}

.soap-section:nth-child(4) {
    border-left-color: #90e0ef;
}

.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border-left: 5px solid var(--sky-blue);
    border: 2px solid rgba(0, 180, 216, 0.3);
    transition: all 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 119, 182, 0.2);
    border-color: var(--sky-blue);
}

.info-card i {
    font-size: 2.5rem;
    color: var(--ocean-blue);
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 119, 182, 0.3));
}

.info-card h4 {
    color: var(--navy-blue);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-card ul, .info-card ol {
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.info-card li {
    margin-bottom: 0.7rem;
    color: var(--navy-blue);
    line-height: 1.6;
}

.footer {
    background: linear-gradient(135deg, var(--navy-blue) 0%, #02033e 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    color: white;
    position: relative;
}

.footer p {
    margin: 0.3rem 0;
    opacity: 0.9;
    color: #000000;
}

.footer #backendUrl {
    color: var(--light-blue);
    font-weight: 600;
}

.status {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.status i {
    margin-right: 5px;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--ocean-blue) 100%);
    color: white;
    padding: 18px 28px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(3, 4, 94, 0.4);
    display: none;
    z-index: 1000;
    font-weight: 500;
    border: 2px solid rgba(139, 174, 102, 0.3);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease-out;
}

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .container {
        margin-left: 0;
        max-width: 100%;
    }
    
    .upload-section,
    .results-container,
    .info-section {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
}

/* Additional polish and effects */
.result-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

audio {
    width: 100%;
    margin-top: 1rem;
    filter: sepia(30%) saturate(80%) hue-rotate(40deg);
}

#recordedAudio {
    border-radius: 10px;
    background: white;
    padding: 0.5rem;
}

/* Success/Error states */
.toast.success {
    background: linear-gradient(135deg, var(--sage-green) 0%, #9fc077 100%);
}

.toast.error {
    background: linear-gradient(135deg, #c44536 0%, #d32f2f 100%);
}

.toast.warning {
    background: linear-gradient(135deg, #f5a623 0%, #f7b733 100%);
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.2s ease, background-color 0.2s ease;
}

button, .browse-btn, .btn-action {
    position: relative;
    overflow: hidden;
}

button::before, .browse-btn::before, .btn-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before, .browse-btn:active::before, .btn-action:active::before {
    width: 300px;
    height: 300px;
}

/* Edit mode styling */
.soap-content[contenteditable="true"] {
    border: 2px solid var(--ocean-blue);
    border-radius: 8px;
    padding: 15px;
    background: rgba(0, 180, 216, 0.05);
    cursor: text;
    outline: none;
    transition: all 0.3s ease;
    min-height: 80px;
}

.soap-content[contenteditable="true"]:focus {
    background: rgba(0, 180, 216, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.2);
}

.soap-content[contenteditable="false"] {
    cursor: default;
}

/* Dropdown menu styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(3, 4, 94, 0.15);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 5px;
    z-index: 100;
    border: 1px solid rgba(0, 119, 182, 0.2);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--navy-blue);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: rgba(0, 180, 216, 0.1);
}

.dropdown-menu a i {
    width: 18px;
    text-align: center;
}

.dropdown.active .dropdown-menu {
    display: block;
}
