/* Dictionary Page Styles */

/* Header Section Adjustments */
.logo-section {
    padding-top: 80px !important;
    padding-bottom: 10px;
}

.search-section {
    padding-top: 20px !important;
    padding-bottom: 10px;
}

.button-section.dictionary-mode-tabs {
    padding-top: 15px !important;
    padding-bottom: 15px;
}

/* Footer Styling Improvements */
.footer-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

.footer-logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 10px 0 5px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-logo-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.footer-bottom {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    width: 100%;
}

.footer-bottom .copyright {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin: 0;
}

.footer-right-side {
    align-items: center !important;
    height: auto !important;
    justify-content: flex-start !important;
    gap: 15px;
}

.footer-col ul li a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    padding-left: 5px;
    color: #fff !important;
    transform: translateX(3px);
}

.social-icons a {
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.social-icons a:hover {
    transform: scale(1.15);
    background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .footer-logo-title {
        font-size: 1.2rem;
    }
    
    .footer-logo-subtitle {
        font-size: 0.8rem;
    }
}

/* Logo Text Styling */
.logo-text-link {
    text-decoration: none;
    color: #fff;
    display: block;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
    font-family: 'Arial', sans-serif;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
}

.logo-text-link:hover .logo-text {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
    transition: text-shadow 0.3s ease;
}

.dictionary-main {
    min-height: calc(100vh - 400px);
    padding: 50px 20px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

.dictionary-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Welcome Section */
.dictionary-welcome {
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
    overflow: hidden;
}

.dictionary-welcome-title {
    font-size: 3.5rem;
    color: #1d2a57;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dictionary-welcome-subtitle {
    font-size: 1.2rem;
    color: #626a8a;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* Dictionary Mode Card */
.dictionary-mode-card {
    background: linear-gradient(180deg, #1f767a 0%, #106468 100%);
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 15px 50px rgba(31, 118, 122, 0.35);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.dictionary-mode-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.dictionary-mode-card-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dictionary-mode-card-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    margin-bottom: 15px;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.dictionary-mode-card-description:last-of-type {
    margin-bottom: 40px;
}

/* Dictionary Mode Options */
.dictionary-mode-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.dictionary-mode-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    text-align: left;
}

.dictionary-mode-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.dictionary-mode-option:hover::before {
    left: 100%;
}

.dictionary-mode-option:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(8px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.dictionary-mode-option:active {
    transform: translateX(5px) scale(0.98);
}

.dictionary-mode-option.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.mode-arrow {
    font-size: 1.5rem;
    margin-right: 15px;
    font-weight: 600;
    transition: transform 0.3s ease;
    display: inline-block;
}

.dictionary-mode-option:hover .mode-arrow {
    transform: translateX(5px);
}

.mode-text {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Search Result Styles */
.dictionary-result {
    min-height: 400px;
}

.dictionary-word-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(16, 100, 104, 0.1);
}

.dictionary-word-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.dictionary-word-header {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 25px;
    margin-bottom: 30px;
    position: relative;
}

.dictionary-word-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #106468, #5bd1d7);
    border-radius: 2px;
}

.dictionary-word-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.dictionary-word-title h2 {
    font-size: 2.25rem;
    color: #1d2a57;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1d2a57 0%, #106468 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dictionary-english-word {
    font-size: 1.2rem;
    color: #626a8a;
    font-style: italic;
    margin-top: 5px;
    font-weight: 400;
}

.dictionary-phonetic {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.dictionary-phonetic-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #626a8a;
}

.dictionary-phonetic-text {
    color: #1d2a57;
    font-weight: 500;
}

.dictionary-audio-btn {
    background: none;
    border: none;
    color: #1d2a57;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.3s;
}

.dictionary-audio-btn:hover {
    color: #106468;
}

.dictionary-part-of-speech {
    font-style: italic;
    color: #626a8a;
    font-size: 1rem;
    margin-top: 10px;
}

.dictionary-meaning-title {
    font-size: 1.125rem;
    color: #1d2a57;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* Meanings Section */
.dictionary-meanings {
    margin-top: 25px;
}

.dictionary-meaning {
    margin-bottom: 30px;
}

.dictionary-meaning-title {
    font-size: 1.125rem;
    color: #1d2a57;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dictionary-definition-list {
    list-style: none;
    padding: 0;
}

.dictionary-definition-item {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.dictionary-definition-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #106468;
    font-size: 1.5rem;
    line-height: 1.2;
}

.dictionary-definition-text {
    color: #1d2a57;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 6px;
    margin-bottom: 8px;
    font-style: italic;
}

.dictionary-definition-vietnamese-main {
    color: #106468;
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 10px;
    font-weight: 600;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e0f7f8 0%, #f0f8f9 100%);
    border-radius: 10px;
    border-left: 5px solid #106468;
    box-shadow: 0 3px 10px rgba(16, 100, 104, 0.15);
    transition: all 0.3s ease;
}

.dictionary-definition-vietnamese-main:hover {
    box-shadow: 0 5px 15px rgba(16, 100, 104, 0.2);
    transform: translateX(3px);
}

.dictionary-definition-vietnamese {
    color: #106468;
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    padding: 8px 12px;
    background-color: #f0f8f9;
    border-radius: 4px;
    border-left: 3px solid #106468;
}

.dictionary-vietnamese-word {
    font-size: 1.5rem;
    color: #106468;
    font-weight: 600;
    margin-top: 8px;
    padding: 8px 0;
}

.dictionary-example {
    color: #626a8a;
    font-style: italic;
    margin-top: 12px;
    padding: 15px 18px;
    border-left: 4px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dictionary-example:hover {
    background: #f5f5f5;
    border-left-color: #106468;
}

.dictionary-example-en {
    color: #626a8a;
    font-style: italic;
    font-size: 0.95rem;
}

.dictionary-example-vi {
    color: #106468;
    font-style: italic;
    font-size: 0.95rem;
    padding-left: 15px;
    border-left: 2px solid #106468;
}

.dictionary-example-vietnamese {
    color: #106468;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 6px;
    padding-left: 15px;
    border-left: 3px solid #106468;
    background-color: #f9fffe;
}

.dictionary-synonyms {
    margin-top: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.dictionary-synonyms:hover {
    background: linear-gradient(135deg, #e8e8e8 0%, #e0e0e0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dictionary-synonyms-title {
    font-weight: 600;
    color: #1d2a57;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.dictionary-synonyms-list {
    color: #106468;
    font-size: 0.95rem;
}

/* Error State */
.dictionary-error {
    text-align: center;
    padding: 60px 20px;
    color: #d14620;
}

.dictionary-error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.dictionary-error h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #d14620;
}

.dictionary-error p {
    font-size: 1rem;
    color: #626a8a;
}

/* Loading State */
.dictionary-loading {
    text-align: center;
    padding: 60px 20px;
}

.dictionary-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #106468;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dictionary-loading p {
    color: #626a8a;
    font-size: 1rem;
}

/* Empty State */
.dictionary-empty {
    text-align: center;
    padding: 60px 20px;
    color: #626a8a;
}

.dictionary-empty-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.dictionary-empty p {
    font-size: 1rem;
    margin-bottom: 10px;
}

/* Search Input Enhancement */
#dictionary-search-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

#dictionary-search-input:focus {
    outline: none;
    border-color: #106468;
    box-shadow: 0 0 0 3px rgba(16, 100, 104, 0.1);
    transform: translateY(-1px);
}

/* Language Selector Dropdown */
.language-select-wrapper {
    position: relative;
}

.dictionary-lang-select {
    padding: 8px 30px 8px 12px;
    border: none;
    background-color: #fff;
    color: #1d2a57;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231d2a57' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.dictionary-lang-select:focus {
    outline: 2px solid #106468;
    outline-offset: 2px;
}

/* Search Button */
#dictionary-search-btn {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #106468 0%, #5bd1d7 100%);
    color: white;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 100, 104, 0.3);
    position: relative;
    overflow: hidden;
}

#dictionary-search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#dictionary-search-btn:hover::before {
    width: 300px;
    height: 300px;
}

#dictionary-search-btn:hover {
    background: linear-gradient(135deg, #0d5054 0%, #106468 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(16, 100, 104, 0.4);
}

#dictionary-search-btn:active {
    transform: translateY(0) scale(0.98);
}

#dictionary-search-btn i {
    font-size: 0.9rem;
}

#dictionary-search-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Dictionary Mode Tabs */
.dictionary-mode-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.dict-mode-btn {
    padding: 10px 24px;
    border: 2px solid #106468;
    background-color: #fff;
    color: #106468;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.dict-mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 100, 104, 0.1), transparent);
    transition: left 0.5s;
}

.dict-mode-btn:hover::before {
    left: 100%;
}

.dict-mode-btn:hover {
    background-color: #f0f8f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 100, 104, 0.2);
}

.dict-mode-btn.active {
    background: linear-gradient(135deg, #106468 0%, #5bd1d7 100%);
    color: white;
    border-color: #106468;
    box-shadow: 0 4px 15px rgba(16, 100, 104, 0.3);
}

.dict-mode-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 100, 104, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo-section {
        padding-top: 60px !important;
    }

    .search-section {
        padding-top: 15px !important;
    }

    .dictionary-welcome {
        padding: 50px 15px 40px;
    }

    .dictionary-welcome-title {
        font-size: 2rem;
    }

    .dictionary-welcome-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .dictionary-mode-card {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .dictionary-mode-card-title {
        font-size: 1.75rem;
    }

    .dictionary-mode-card-description {
        font-size: 0.95rem;
    }

    .dictionary-mode-option {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .mode-arrow {
        font-size: 1.3rem;
        margin-right: 12px;
    }

    .mode-text {
        font-size: 1rem;
    }

    .dictionary-word-title h2 {
        font-size: 1.5rem;
    }

    .dictionary-type-card {
        padding: 20px;
    }

    .dictionary-word-card {
        padding: 20px;
    }

    .dictionary-main {
        padding: 20px 10px;
    }

    .dictionary-mode-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .dict-mode-btn {
        width: 100%;
    }

    .search-bar {
        flex-wrap: wrap;
    }

    #dictionary-search-input {
        width: 100%;
        margin-bottom: 8px;
    }

    .language-select-wrapper {
        width: 100%;
        margin-bottom: 8px;
    }

    .dictionary-lang-select {
        width: 100%;
    }

    #dictionary-search-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dictionary-welcome {
        padding: 40px 12px 30px;
    }

    .dictionary-welcome-title {
        font-size: 1.75rem;
    }

    .dictionary-welcome-subtitle {
        font-size: 0.9rem;
        margin-bottom: 35px;
    }

    .dictionary-mode-card {
        padding: 30px 20px;
        border-radius: 18px;
    }

    .dictionary-mode-card-title {
        font-size: 1.5rem;
    }

    .dictionary-mode-card-description {
        font-size: 0.9rem;
    }

    .dictionary-mode-option {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .mode-arrow {
        font-size: 1.2rem;
        margin-right: 10px;
    }

    .mode-text {
        font-size: 0.95rem;
    }

    .dictionary-word-title h2 {
        font-size: 1.25rem;
    }

    .dictionary-type-card {
        padding: 15px;
    }

    .dictionary-word-card {
        padding: 15px;
    }

    .dictionary-main {
        padding: 15px 8px;
    }
}

