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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9fafb;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Navbar styling */
.navbar {
    background-color: #1e40af;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.navbar-brand svg {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.navbar-brand img {
    width: 10rem;
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
}

.navbar-item {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid white;
    cursor: pointer;
}

/* Container styling */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.result-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Message display */
.message-display {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Current message pair styling */
.message-pair {
    display: none;
    animation: fadeEffect 0.5s;
}

.message-pair.active {
    display: block;
}

@keyframes fadeEffect {
    from {
        opacity: 0.7;
    }

    to {
        opacity: 1;
    }
}

.pair-indicator {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: #6b7280;
}

/* Transcription styling */
.transcription {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.transcription-label,
.generated-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.transcription-label {
    color: #3b82f6;
}

.transcription-text {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    border-radius: 6px;
    line-height: 1.5;
    word-break: break-word;
    max-height: 10rem;
    overflow-y: auto;
    
}

/* Generated text styling */
.generated-label {
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.generated-text {
    background-color: #ecfdf5;
    border-left: 4px solid #10b981;
    padding: 1rem;
    border-radius: 6px;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    word-break: break-word;
    max-height: 10rem;
    overflow-y: auto;
}

/* Navigation controls */
.nav-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.nav-button {
    background-color: #f3f4f6;
    border: none;
    border-radius: 8px;
    width: 110px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
    font-weight: 500;
}

.nav-button:hover:not(:disabled) {
    background-color: #e5e7eb;
    transform: translateY(-2px);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-button svg {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

/* Read aloud button */
.controls-area {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.read-aloud-btn {
    background-color: #10b981;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    margin-left: auto;
}

.read-aloud-btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.read-aloud-btn svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* Pagination indicator */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 6px;
}

.page-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s;
}

.page-dot.active {
    background-color: #3b82f6;
    transform: scale(1.2);
}

/* Recording interface */
.recording-interface {
    padding: 1rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.record-button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.record-button svg {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

#startRecording {
    background-color: #ef4444;
    color: white;
}

#startRecording:hover:not(:disabled) {
    background-color: #dc2626;
}

#stopRecording {
    background-color: #6b7280;
    color: white;
}

#stopRecording:hover:not(:disabled) {
    background-color: #4b5563;
}

.record-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.record-status {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Status and loader */
.status-area {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.loader {
    display: none;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.processing {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.empty-state h3 {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* Audio player */
.audio-player-container {
    margin-top: 1rem;
}

#audio-player {
    width: 100%;
    height: 40px;
}

/* Response indicator */
.response-indicator {
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
    background-color: #f8fafc;
    border-radius: 6px;
    margin-top: 1rem;
    color: #64748b;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: fixed;
    padding: 5px;
    bottom: 0;
    left: 0;
    right: 0;
    color: blue;
}

footer a {
    text-decoration: none;
    /* color: rgb(4, 79, 253); */

}

#openFooterPopup {
    border: none;
    background-color: transparent;
    color: blue;
    text-decoration: dotted;
    cursor: pointer;
    font-size: 14px;
}

.policy {
    flex-grow: 1;
    margin-right: 10px;
    margin-top: 1rem;
    line-height: 1.4rem;
    font-size: 15px;
}

.copyright {
    flex-shrink: 0;
    margin-top: 1rem;
    font-weight: 600;

}