body {
    background: #fff;
    color: #222;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.topbar {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand-menu-btn {
    color: #fff;
    font-size: 1.4rem;
    transition: transform 0.2s;
}

.brand-menu-btn:hover {
    transform: scale(1.1);
    color: #ffc107;
}

.search-input {
    width: 100%;
    border-radius: 25px;
    padding: 8px 20px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

.figure-wrap {
    position: relative;
    margin-bottom: 30px;
}

.image-container {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.phrase-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s;
}

.phrase-image:hover {
    transform: scale(1.01);
}

.play-audio-btn {
    position: relative
    top: auto;
    right: auto;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #ffc107;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.play-audio-btn:hover {
    background: #ffc107;
    transform: scale(1.1);
}

.play-audio-btn i {
    font-size: 1.4rem;
    color: #333;
}

.card-section {
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.card-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.question-block {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-bottom: 20px;
}

.question-text {
    color: #2c3e50;
    font-size: 1.1rem;
}

.form-check {
    margin-bottom: 8px;
    padding-left: 2rem;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.3em;
}

.form-check-input:checked {
    background-color: #3498db;
    border-color: #3498db;
}

.footer {
    background: #000000;
    color: #ffffff;
    padding: 25px 0;
    margin-top: 40px;
    border-top: 5px solid #ffc107;
}

.footer small {
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer a {
    color: #ffc107;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .image-container {
        max-width: 100%;
    }

    .card-section {
        padding: 15px;
    }

    .play-audio-btn {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
    }

    .search-input {
        max-width: 100%;
    }

    .font-title {
        font-size: 1.5rem;
    }
}

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

section {
    animation: fadeIn 0.5s ease-out;
}

.dropdown-menu {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 8px;
    margin-top: 8px;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
    padding-left: 25px;
}

.btn-primary {
    background: linear-gradient(to right, #3498db, #2980b9);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(to right, #95a5a6, #7f8c8d);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-warning {
    background: linear-gradient(to right, #ffc107, #e0a800);
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: bold;
}

.font-title {
    color: #2c3e50;
    border-bottom: 3px solid #ffc107;
    padding-bottom: 10px;
}

.font-questions {
    font-family: "Georgia", "Times New Roman", Times, serif;
    font-size: 1.05rem;
}

.font-description {
    font-family: "Tahoma", Verdana, Geneva, sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
}

.font-dict {
    font-family: "Courier New", "Lucida Console", Monaco, monospace;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #3498db;
}

.font-dict dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.font-dict dt {
    font-weight: 600;
    margin: 0;
}

.font-dict dd {
    margin: 0;
    color: #666;
}

.font-dict dl > div {
    background: white;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.font-dict dt:hover {
    color: #3498db;
    cursor: pointer;
}