/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 5px;
}

.logo i {
    font-size: 32px;
    color: #667eea;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
}

.subtitle {
    font-size: 14px;
    color: #718096;
    font-weight: 400;
}

/* Navigation Tabs */
.nav-tabs {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tabs-wrapper {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn i {
    font-size: 18px;
}

.tab-btn:hover {
    background: #f7fafc;
    border-color: #667eea;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Main Content */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Search Section */
.search-section {
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding: 15px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-box i {
    color: #667eea;
    font-size: 20px;
    margin-right: 15px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #2d3748;
}

.search-box input::placeholder {
    color: #a0aec0;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-btn i {
    font-size: 16px;
}

.category-btn:hover {
    background: #f7fafc;
    border-color: #667eea;
    transform: translateY(-2px);
}

.category-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Phrases Container */
.phrases-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Phrase Card */
.phrase-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.phrase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.phrase-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.category-badge i {
    font-size: 12px;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #cbd5e0;
    transition: all 0.3s ease;
    padding: 5px;
}

.favorite-btn:hover {
    color: #fc8181;
    transform: scale(1.2);
}

.favorite-btn.active {
    color: #f56565;
}

.phrase-text {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.5;
}

.phrase-actions {
    display: flex;
    gap: 10px;
}

.speak-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.speak-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.speak-btn:active {
    transform: scale(0.95);
}

.speak-btn i {
    font-size: 18px;
}

.speak-btn.speaking {
    animation: pulse 1s infinite;
}

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

/* Favorites Header */
.favorites-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.favorites-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.favorites-header i {
    color: #fc8181;
}

.favorites-header p {
    font-size: 16px;
    opacity: 0.9;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.empty-state i {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    font-size: 14px;
    color: #718096;
    margin: 5px 0;
}

.footer i {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 22px;
    }
    
    .logo i {
        font-size: 26px;
    }
    
    .subtitle {
        font-size: 12px;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .category-filter {
        gap: 8px;
    }
    
    .category-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .phrases-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .phrase-card {
        padding: 15px;
    }
    
    .phrase-text {
        font-size: 16px;
    }
    
    .speak-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .favorites-header h2 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .tabs-wrapper {
        width: 100%;
    }
    
    .tab-btn {
        flex: 1;
        justify-content: center;
    }
    
    .tab-btn span {
        display: none;
    }
    
    .category-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}
