/* 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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.app-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-selector select {
    padding: 0.7rem 1.2rem;
    border: 2px solid #2196F3;
    border-radius: 25px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.2);
}

.language-selector select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.3);
}

.language-selector select:focus {
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

/* Main Content */
.app-main {
    padding: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.content-section.active {
    display: block;
}

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

/* Recording Container */
.recording-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.recording-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2196F3, #4CAF50, #FFC107, #F44336);
    border-radius: 25px 25px 0 0;
}

.recording-status {
    text-align: center;
    margin-bottom: 2.5rem;
}

.recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 1.3rem;
    color: #666;
    transition: all 0.3s ease;
    font-weight: 500;
}

.recording-indicator.active {
    color: #F44336;
    animation: pulse 1.5s infinite;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.3);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.05);
    }
}

.recording-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

/* Enhanced Button Styles */
.record-button, .stop-button, .pause-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-button::before, .stop-button::before, .pause-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.record-button:hover::before, .stop-button:hover::before, .pause-button:hover::before {
    opacity: 1;
}

.record-button {
    background: linear-gradient(135deg, #F44336, #E53935);
    color: white;
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.4);
}

.record-button:hover:not(:disabled) {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 15px 35px rgba(244, 67, 54, 0.5);
}

.record-button:active:not(:disabled) {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 67, 54, 0.4);
}

.record-button:disabled {
    background: linear-gradient(135deg, #ccc, #bbb);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stop-button {
    background: linear-gradient(135deg, #9C27B0, #8E24AA);
    color: white;
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.4);
}

.stop-button:hover:not(:disabled) {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 15px 35px rgba(156, 39, 176, 0.5);
}

.stop-button:active:not(:disabled) {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(156, 39, 176, 0.4);
}

.pause-button {
    background: linear-gradient(135deg, #FFC107, #FFB300);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.pause-button:hover:not(:disabled) {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.5);
}

.pause-button:active:not(:disabled) {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

.stop-button:disabled, .pause-button:disabled {
    background: linear-gradient(135deg, #ccc, #bbb);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Transcription Display */
.transcription-display {
    margin-bottom: 2.5rem;
}

.live-transcription {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    padding: 2rem;
    min-height: 180px;
    border: 2px dashed #ddd;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.live-transcription::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.live-transcription.active::before {
    transform: translateX(100%);
}

.live-transcription.active {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f1f8e9, #e8f5e8);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.live-transcription p {
    margin: 0;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    font-weight: 400;
}

.live-transcription.active p {
    color: #2E7D32;
    font-weight: 500;
}

/* Memo Save Section */
.memo-save-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 2rem;
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1rem;
}

.memo-save-section input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.memo-save-section input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
}

.memo-actions {
    display: flex;
    gap: 1.2rem;
}

/* Enhanced Action Buttons */
.save-memo-btn, .discard-memo-btn {
    flex: 1;
    padding: 1.2rem 1.5rem;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.save-memo-btn::before, .discard-memo-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.save-memo-btn:hover::before, .discard-memo-btn:hover::before {
    left: 100%;
}

.save-memo-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.save-memo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
}

.save-memo-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.discard-memo-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

.discard-memo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(244, 67, 54, 0.4);
}

.discard-memo-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
}

/* Memos Section */
.memos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.memos-header h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-container {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    flex: 1;
    max-width: 350px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-container input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: #333;
    font-weight: 500;
}

.search-container input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-container button {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 600;
}

.search-container button:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateX(2px);
}

.filter-container {
    margin-bottom: 2rem;
}

.filter-container select {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-container select:hover {
    border-color: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.2);
}

.filter-container select:focus {
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.memos-container {
    display: grid;
    gap: 1.5rem;
}

.memo-card {
    background: #e8f5e8;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.memo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2196F3, #4CAF50);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.memo-card:hover::before {
    transform: scaleX(1);
}

.memo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.memo-card h3 {
    color: #2196F3;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.memo-card p {
    color: #fdfdfd;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    font-weight: 400;
}

.memo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}

.memo-actions {
    display: flex;
    gap: 0.8rem;
}

.memo-actions button {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
}

.memo-actions button:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
    color: #2196F3;
}

.empty-state p {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.empty-state small {
    opacity: 0.8;
    font-size: 1rem;
}

/* Settings Section */
.settings-header h2 {
    color: white;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.setting-group {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.setting-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2196F3, #4CAF50, #FFC107);
}

.setting-group h3 {
    color: #2196F3;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    color: #faf9f9;
}

.setting-item:hover {
    background: rgba(33, 150, 243, 0.05);
    border-radius: 10px;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-weight: 600;
    color: #faf9f9;
    font-size: 1.1rem;
}
.setting-item p small {
    color: #faf9f9;
}

.setting-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #2196F3;
    transform: scale(1.2);
}

/* Enhanced Settings Buttons */
.export-all-btn, .clear-all-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 1.2rem 2rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
}

.export-all-btn::before, .clear-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.export-all-btn:hover::before, .clear-all-btn:hover::before {
    left: 100%;
}

.clear-all-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

.export-all-btn:hover, .clear-all-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.export-all-btn:active, .clear-all-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.faq-header h2 {
    color: white;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.faq-question {
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    padding: 1.8rem 2rem;
    text-align: left;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faq-question::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.faq-question:hover::before {
    opacity: 1;
}

.faq-question[aria-expanded="true"] {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.faq-question[aria-expanded="true"]::before {
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

.faq-icon {
    font-size: 1.4rem;
    color: #2196F3;
    transition: all 0.3s ease;
    font-weight: bold;
    z-index: 1;
}

.faq-question[aria-expanded="true"] .faq-icon {
    color: white;
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 2rem 2rem;
    color: #555;
    line-height: 1.7;
    animation: slideDown 0.4s ease-out;
    background: white;
}

.faq-answer[hidden] {
    display: none;
}

.faq-answer h4 {
    color: #2196F3;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.faq-answer ul {
    margin: 1.2rem 0;
    padding-left: 2rem;
}

.faq-answer li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.faq-answer code {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: #e91e63;
    font-weight: 600;
    border: 1px solid #dee2e6;
}

.highlight-box {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-left: 4px solid #2196F3;
    padding: 1.2rem;
    margin: 1.2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.1);
}

.warning-box {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-left: 4px solid #ff9800;
    padding: 1.2rem;
    margin: 1.2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(255, 152, 0, 0.1);
}

.success-box {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    border-left: 4px solid #4caf50;
    padding: 1.2rem;
    margin: 1.2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.1);
}

.contact-section {
    margin-top: 3rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-section h3 {
    color: #2196F3;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.contact-section p {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.contact-button:hover::before {
    left: 100%;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(33, 150, 243, 0.4);
}

.contact-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease-in-out;
}

.modal-content {
    background: white;
    border-radius: 25px;
    max-width: 90vw;
    max-height: 90vh;
    width: 550px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.modal.active .modal-header::before {
    transform: translateX(100%);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    z-index: 1;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.memo-details input, .memo-details textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafafa;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.memo-details input:focus, .memo-details textarea:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
    background: white;
}

.memo-details textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.6;
}

.memo-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.modal-actions button {
    flex: 1;
    min-width: 140px;
    padding: 1.2rem 1.5rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.modal-actions button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.modal-actions button:hover::before {
    left: 100%;
}

.save-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.export-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

.delete-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

.modal-actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.modal-actions button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0.8rem 1rem;
    border-radius: 15px;
    min-width: 70px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.nav-item.active {
    color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2);
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item:hover {
    color: #2196F3;
    transform: translateY(-2px);
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item.active i {
    transform: scale(1.1);
    color: #2196F3;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .app-header h1 {
        font-size: 1.3rem;
    }
    
    .memos-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .modal-content {
        width: 95vw;
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .memo-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .app-main {
        padding: 0.5rem;
    }
    
    .recording-container {
        padding: 1.5rem;
    }
    
    .recording-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .record-button, .stop-button, .pause-button {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }
    
    .bottom-nav {
        padding: 0.5rem 0;
    }
    
    .nav-item {
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
}

/* Accessibility improvements */
/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Better focus indicators */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid #2196F3;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Improved button states */
.record-button:focus-visible,
.stop-button:focus-visible,
.pause-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* Better contrast for accessibility */
@media (prefers-contrast: high) {
    .recording-container,
    .memo-card,
    .setting-group,
    .faq-item {
        border: 2px solid #000;
        background: #fff;
    }
    
    .record-button, .stop-button, .pause-button {
        border: 2px solid #000;
    }
    
    .nav-item.active {
        background: #000;
        color: #fff;
    }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .recording-indicator.active {
        animation: none;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Better touch targets for mobile */
@media (max-width: 768px) {
    .record-button, .stop-button, .pause-button {
        min-width: 60px;
        min-height: 60px;
    }
    
    .nav-item {
        min-height: 60px;
        padding: 0.8rem 0.5rem;
    }
    
    .memo-card {
        padding: 1.2rem;
    }
    
    .faq-question {
        min-height: 60px;
        padding: 1.2rem;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .app-header h1 {
        font-size: 1.4rem;
    }
    
    .app-main {
        padding: 1rem;
        max-width: 100%;
    }
    
    .recording-container {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .recording-controls {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .record-button, .stop-button, .pause-button {
        width: 70px;
        height: 70px;
        font-size: 1.6rem;
    }
    
    .memos-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-container {
        max-width: none;
    }
    
    .modal-content {
        width: 95vw;
        margin: 1rem;
        border-radius: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .memo-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .bottom-nav {
        padding: 0.8rem 0;
    }
    
    .nav-item {
        font-size: 0.8rem;
        min-width: 60px;
        padding: 0.6rem 0.8rem;
    }
    
    .nav-item i {
        font-size: 1.2rem;
    }
    
    .faq-question {
        padding: 1.5rem;
        font-size: 1.1rem;
    }
    
    .faq-answer {
        padding: 0 1.5rem 1.5rem;
    }
    
    .contact-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .app-main {
        padding: 0.8rem;
    }
    
    .recording-container {
        padding: 1.5rem 1rem;
    }
    
    .record-button, .stop-button, .pause-button {
        width: 65px;
        height: 65px;
        font-size: 1.5rem;
    }
    
    .memo-card {
        padding: 1.5rem;
    }
    
    .setting-group {
        padding: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .memo-details input, .memo-details textarea {
        padding: 1rem 1.2rem;
        font-size: 1rem;
    }
}

/* Enhanced Animations and Effects */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3); }
    50% { box-shadow: 0 8px 25px rgba(33, 150, 243, 0.6); }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* Special effects for active recording */
.recording-indicator.active {
    animation: pulse 1.5s infinite, glow 2s infinite;
}

.record-button:not(:disabled):hover {
    animation: float 2s ease-in-out infinite;
}

/* Enhanced focus states */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid #2196F3;
    outline-offset: 3px;
    border-radius: 8px;
}

/* Improved button states */
.record-button:focus-visible,
.stop-button:focus-visible,
.pause-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

/* Loading animation for buttons */
.loading-button {
    position: relative;
    overflow: hidden;
}

.loading-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* Enhanced scrollbar */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

/* Enhanced selection */
::selection {
    background: rgba(33, 150, 243, 0.3);
    color: #333;
}

::-moz-selection {
    background: rgba(33, 150, 243, 0.3);
    color: #333;
}

/* Enhanced placeholder */
input::placeholder,
textarea::placeholder {
    color: #999;
    font-weight: 400;
    transition: color 0.3s ease;
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: #ccc;
}

/* Enhanced disabled states */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(50%);
}

/* Enhanced hover effects for cards */
.memo-card:hover .memo-card h3 {
    color: #1976D2;
}

/* Enhanced notification styles */
.notification {
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Enhanced empty state */
.empty-state {
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.empty-state:hover::before {
    transform: translateX(100%);
}

/* Enhanced accessibility for reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .recording-indicator.active {
        animation: none;
    }
    
    .record-button:not(:disabled):hover {
        animation: none;
    }
    
    .loading-button::after {
        animation: none;
    }
}

/* Enhanced high contrast mode */
@media (prefers-contrast: high) {
    .recording-container,
    .memo-card,
    .setting-group,
    .faq-item {
        border: 2px solid #000;
        background: #fff;
    }
    
    .record-button, .stop-button, .pause-button {
        border: 2px solid #000;
    }
    
    .nav-item.active {
        background: #000;
        color: #fff;
    }
    
    .modal-content {
        border: 2px solid #000;
    }
    
    .search-container,
    .filter-container select {
        border: 2px solid #000;
        background: #fff;
    }
}

/* Enhanced dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .app-header {
        background: rgba(0, 0, 0, 0.8);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .recording-container,
    .memo-card,
    .setting-group,
    .faq-item {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .bottom-nav {
        background: rgba(0, 0, 0, 0.8);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .search-container,
    .filter-container select {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .search-container input,
    .filter-container select {
        color: #fff;
    }
    
    .search-container input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }
}

/* Enhanced print styles */
@media print {
    .bottom-nav,
    .recording-controls,
    .modal,
    .notification {
        display: none !important;
    }
    
    .recording-container,
    .memo-card,
    .setting-group,
    .faq-item {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
