* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #c0392b;
    --accent-color: #d35400;
    --bg-color: #f5f6fa;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e1e8ed;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: white;
    padding: 35px 0;
    text-align: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 3px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.slogan-en {
    font-size: 0.85rem;
    opacity: 0.75;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.5px;
}

.main-content {
    flex: 1;
    padding: 30px 0;
}

.search-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.search-box {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.filter-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 250px;
}

.filter-label {
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    font-size: 0.95rem;
}

.filter-select {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.results-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.results-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.results-count {
    background: var(--primary-color);
    color: white;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cocktails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cocktail-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cocktail-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.cocktail-card h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    color: var(--primary-color);
    font-weight: 700;
}

.cocktail-card .name-en {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    font-style: italic;
}

.cocktail-card .base-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.cocktail-card .base-label {
    background: rgba(192, 57, 43, 0.1);
    color: var(--secondary-color);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.cocktail-card .base-value {
    color: var(--text-color);
    font-weight: 500;
}

.cocktail-card .description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cocktail-card .tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(211, 84, 0, 0.1);
    color: var(--accent-color);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 14px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--secondary-color);
    background: rgba(0, 0, 0, 0.05);
}

.modal-body {
    padding: 35px;
}

.modal-header {
    margin-bottom: 25px;
    text-align: center;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-weight: 700;
}

.modal-name-en {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 12px;
}

.modal-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-tags .tag {
    font-size: 0.8rem;
    padding: 5px 12px;
}

.modal-info {
    background: var(--bg-color);
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    padding: 8px 0;
}

.info-label {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 70px;
}

.info-value {
    color: var(--text-color);
    font-weight: 500;
}

.modal-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
}

.ingredients-text,
.steps-text,
.flavor-text {
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 0.95rem;
}

.flavor-text {
    background: linear-gradient(135deg, rgba(211, 84, 0, 0.05), rgba(192, 57, 43, 0.05));
    border-left: 4px solid var(--accent-color);
}

.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

.footer p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-results h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .filter-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .results-section {
        padding: 20px;
    }
    
    .cocktails-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 25px 0;
    }
    
    .main-content {
        padding: 15px 0;
    }
    
    .results-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
