/* Voxa.1 Design System - Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0066CC;
    --primary-coral: #FF6B6B;
    --light-blue: #E6F2FF;
    --light-coral: #FFE5E5;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--primary-coral));
    --gradient-reverse: linear-gradient(135deg, var(--primary-coral), var(--primary-blue));
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
}

/* Animation for feedback messages */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-text {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.logo i {
    color: var(--primary-coral);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 0.5rem;
}

.nav-tab {
    background: var(--primary-coral);
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.nav-tab:hover {
    background: #FF7B7B;
    color: #fff;
    transform: translateY(-1px);
}

.nav-tab.active {
    background: var(--primary-blue);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.2);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-card {
    background: var(--gradient-primary);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.2);
    color: #fff;
}

.search-form {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 300px;
}

.search-label {
    display: block;
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
}

.search-input:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    background: #fff;
}

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

/* Button Styles */
.primary-button,
.secondary-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-button {
    background-color: var(--primary-blue);
    color: #fff;
    border: 2px solid var(--primary-blue);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
    background-color: #0052A3;
}

.secondary-button {
    background-color: #fff;
    color: var(--primary-coral);
    border: 2px solid var(--primary-coral);
}

.secondary-button:hover {
    background-color: var(--primary-coral);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Sentence Card Styles with Gradient Border */
.sentence-card {
    background: #fff;
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 102, 204, 0.3);
}

.sentence-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 15px;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.sentence-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 102, 204, 0.2);
    border-color: transparent;
}

.sentence-card:hover::before {
    opacity: 0.3;
}

/* Simple sentence cards - removed to keep all cards the same */

/* Practice words list styling */
.practice-words-list {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.word-item {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    display: inline-block;
}

/* Review title with full-width underline */
.section-title.review-title::after {
    max-width: 100% !important;
    width: 100% !important;
}

.sentence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.sentence-with-points {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.sentence-text-inline {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Points System */
.points-container {
    display: flex;
    gap: 0.25rem;
}

.point-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
    transform: scale(1);
}

.point-circle.filled {
    background: var(--primary-coral);
    border-color: var(--primary-coral);
    animation: fillPoint 0.4s ease-out;
}

@keyframes fillPoint {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Control Buttons */
.sentence-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.sentence-controls button {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Special styling for audio buttons within sentence controls */
.sentence-controls .audio-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    width: auto;
    height: auto;
}

.audio-btn {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.audio-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.3);
    background: #0052A3;
}

.record-btn {
    background: var(--primary-coral);
    color: #fff;
}

.record-btn:not(:disabled) {
    background: var(--primary-blue);
}

.record-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.3);
    background: #0052A3;
}

.play-recorded-btn,
.transcribe-btn {
    background: var(--primary-coral);
    color: #fff;
}

.play-recorded-btn:not(:disabled),
.transcribe-btn:not(:disabled) {
    background: var(--primary-blue);
}

.play-recorded-btn:hover:not(:disabled),
.transcribe-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.3);
    background: #0052A3;
}

.enhance-btn {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
}

.enhance-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
    background: #0052A3;
}

/* Review System Section */
.review-system {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #dee2e6, #ced4da);
    padding: 3rem 0;
    border-radius: 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    position: relative;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.filter-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.1);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.filter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.15);
    border-color: var(--light-coral);
}

.filter-card.active {
    border-color: var(--primary-coral);
    background: linear-gradient(to bottom, var(--light-coral), #fff);
}

.filter-card h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.filter-count {
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.filter-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Progress Section */
.progress-section {
    margin-bottom: 2rem;
}

.progress-card {
    background: var(--primary-blue);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.2);
    color: #fff;
}

.progress-card .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
}

.progress-card .section-title::after {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    background: #fff;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Charts and Analysis */
.intensity-chart,
.voice-intensity-chart {
    margin-top: 0.5rem;
}

.chart-title,
.transcription-title,
.analysis-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.chart-container {
    width: 100%;
    background: var(--light-blue);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--light-coral);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 64px;
}

.transcription-area {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.transcription-area.show {
    display: block !important;
}

/* Force visibility for search results */
[id^="transcription-search-"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Also force visibility for any transcription area that starts with search */
.transcription-area[id*="search-"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure transcription content is visible */
.transcription-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any hidden state for transcription areas */
.transcription-area[style*="display: none"] {
    display: block !important;
}

.transcription-area,
.thought-group-analysis-area {
    margin-top: 0.5rem;
}

.transcription-content {
    background: var(--light-blue);
    border: 1px solid var(--light-coral);
    border-radius: 10px;
    padding: 1rem;
    font-family: monospace;
}

/* Word Details */
.word-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.word-rank {
    background: var(--gradient-primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.word-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
}

.tag {
    background: var(--light-coral);
    color: var(--primary-coral);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Animations */
.shine {
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Footer */
.footer {
    background: var(--gradient-primary);
    color: #fff;
    padding: 3rem 0 1rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-coral), var(--primary-blue), var(--primary-coral));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 5%;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 5% 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.9;
    max-width: 1200px;
    margin: 0 auto;
}

/* Badge */
.badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gradient-primary);
    color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.badge i {
    color: #FFE5E5;
}

.badge-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-left: 10px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.badge-close:hover {
    opacity: 1;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: #0052A3;
    transform: translateY(-2px);
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Recording State */
.record-btn.recording {
    background: var(--primary-blue);
    animation: pulse 2s infinite;
}

/* Disabled States */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.user-menu-button:hover {
    background: var(--light-blue);
    transform: translateY(-1px);
}

.user-menu-button i.fa-user-circle {
    font-size: 1.2rem;
}

.user-menu-button i.fa-chevron-down {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.user-menu-button.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 1.5rem;
    text-align: center;
}

.user-email {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.user-plan {
    font-size: 0.9rem;
    color: var(--primary-blue);
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
}

.dropdown-item:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.dropdown-item.logout {
    color: var(--primary-coral);
}

.dropdown-item.logout:hover {
    background: var(--light-coral);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        flex-wrap: wrap;
    }
    
    .nav-tabs {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .nav-tab {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .user-menu {
        position: absolute;
        right: 1rem;
        top: 1rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-input-wrapper {
        min-width: 100%;
    }
    
    .search-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sentence-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sentence-with-points {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Landing Footer - Unified footer for all pages */
.landing-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.landing-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.landing-footer .footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.landing-footer .footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.landing-footer .footer-brand .logo i {
    font-size: 1.5rem;
    color: var(--primary-coral);
}

.landing-footer .footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.landing-footer .footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.landing-footer .footer-links h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.landing-footer .footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.landing-footer .footer-links a:hover {
    color: #fff;
}

.landing-footer .footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Footer Responsive */
@media (max-width: 968px) {
    .landing-footer .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .landing-footer .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .landing-footer .footer-brand .logo {
        justify-content: center;
    }
}