/* css/style.css */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.app-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

.app-header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5em;
}

.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.app-footer {
    text-align: center;
    padding: 1rem;
    color: #7f8c8d;
    font-size: 0.9em;
}




/* เพิ่มใน css/style.css */

/* Hanzi Animation Styles */
.hanzi-animation-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hanzi-canvas {
    margin: 0 auto;
    border: 3px solid #1a73e8;
    border-radius: 10px;
    background: white;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.hanzi-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hanzi-controls button {
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-animate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-quiz {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-reset {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.hanzi-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hanzi-controls button:active {
    transform: translateY(0);
}

/* Audio Button Styles */
.audio-button {
    padding: 8px 16px;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    background: white;
    color: #4CAF50;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.audio-button:hover {
    background: #4CAF50;
    color: white;
    transform: scale(1.05);
}

.audio-button:active {
    transform: scale(0.95);
}

/* Combined Character-Audio Player */
.character-audio-player {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.character-large {
    font-size: 3em;
    font-weight: bold;
    color: #1a73e8;
}

.pinyin-display {
    font-size: 1.2em;
    color: #666;
    font-style: italic;
}

.player-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.combined-button {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-play-all {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-animate-only {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-audio-only {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.combined-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tone-search-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.tone-btn {
    padding: 10px 15px;
    border: 2px solid #3498db;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    text-align: center;
    min-width: 90px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tone-btn:hover {
    background: #ecf0f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tone-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

.tone-1 { border-color: #e74c3c; }
.tone-2 { border-color: #f39c12; }
.tone-3 { border-color: #27ae60; }
.tone-4 { border-color: #9b59b6; }
.tone-0 { border-color: #95a5a6; }

.tone-1.active { background: #e74c3c; }
.tone-2.active { background: #f39c12; }
.tone-3.active { background: #27ae60; }
.tone-4.active { background: #9b59b6; }
.tone-0.active { background: #95a5a6; }


/* Responsive design */
@media (max-width: 768px) {
    .hanzi-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .hanzi-controls button {
        width: 200px;
    }
    
    .hanzi-canvas {
        width: 120px !important;
        height: 120px !important;
    }
    
    .player-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .character-large {
        font-size: 2.5em;
    }
    
    .player-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .combined-button {
        width: 200px;
        justify-content: center;
    }
}

/* */

    /* Reset และ Base Styles */
    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        margin: 0;
        padding: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        min-height: 100vh;
    }
    
    /* Container */
    #app {
        max-width: 800px;
        margin: 0 auto;
        background: white;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        overflow: hidden;
    }
    
    /* Header */
    h1 {
        background: linear-gradient(135deg, #2c3e50, #3498db);
        color: white;
        padding: 25px 30px;
        margin: 0;
        font-size: 28px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    h1:before {
        content: "📚";
        font-size: 32px;
    }
    
    /* Search Container */
    .search-container {
        padding: 30px;
        background: white;
        border-bottom: 1px solid #f0f0f0;
    }
    
    #searchInput {
        width: 100%;
        padding: 18px 20px;
        font-size: 18px;
        border: 2px solid #e0e0e0;
        border-radius: 15px;
        margin-bottom: 15px;
        transition: all 0.3s ease;
        background: #f8f9fa;
    }
    
    #searchInput:focus {
        outline: none;
        border-color: #3498db;
        background: white;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        transform: translateY(-2px);
    }
    
    /* Utility Buttons */
    .utility-buttons {
        display: flex;
        gap: 12px;
        margin-top: 15px;
        flex-wrap: wrap;
    }
    
    .utility-btn {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 10px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    }
    
    .utility-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    }
    
    .utility-btn.favorites {
        background: linear-gradient(135deg, #f39c12, #e67e22);
        box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    }
    
    .utility-btn.history {
        background: linear-gradient(135deg, #9b59b6, #8e44ad);
        box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
    }
    
    /* Results Container */
    .results-container {
        padding: 0 30px 30px;
    }
    
    /* Search Info */
    .search-info {
        background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
        padding: 20px;
        border-radius: 15px;
        margin-bottom: 20px;
        border-left: 5px solid #3498db;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .search-info strong {
        color: #2c3e50;
        font-size: 16px;
    }
    
    .clear-history-btn {
        background: #e74c3c;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 12px;
        transition: all 0.3s ease;
    }
    
    .clear-history-btn:hover {
        background: #c0392b;
        transform: translateY(-1px);
    }
    
    /* Result Items */
    .result-item {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 15px;
        padding: 25px;
        margin-bottom: 20px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .result-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-color: #3498db;
    }
    
    .result-item:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(135deg, #3498db, #2980b9);
    }
    
    .result-item.compound:before {
        background: linear-gradient(135deg, #27ae60, #2ecc71);
    }
    
    /* Character Display */
    .character-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 15px;
    }
    
    .character-main {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .chinese-char {
        font-size: 42px;
        font-weight: bold;
        color: #2c3e50;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    }
    
    /* ซ้ำ
    .type-badge {
        background: #3498db;
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    
    .type-badge.compound {
        background: linear-gradient(135deg, #27ae60, #2ecc71);
    }
    
    .type-badge.character {
        background: linear-gradient(135deg, #3498db, #2980b9);
    }
    */
    
    /* Favorite Button */
    .favorite-btn {
        background: none;
        border: 2px solid #bdc3c7;
        padding: 10px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 20px;
        transition: all 0.3s ease;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .favorite-btn:hover {
        border-color: #e74c3c;
        transform: scale(1.1);
    }
    
    .favorite-btn.active {
        background: #e74c3c;
        border-color: #e74c3c;
        color: white;
    }
    
    /* Pinyin and Meanings */
    .pinyin {
        color: #e74c3c;
        font-size: 20px;
        font-weight: 500;
        margin-bottom: 10px;
    }
    
    /* ซ้ำ
    .tone-indicator {
        color: #7f8c8d;
        font-size: 14px;
        margin-left: 8px;
    }
    */
    
    .meaning-section {
        margin-bottom: 12px;
    }
    
    .meaning-section strong {
        color: #2c3e50;
        display: inline-block;
        min-width: 120px;
    }
    
    .example-sentence {
        font-style: italic;
        color: #7f8c8d;
        border-left: 3px solid #3498db;
        padding-left: 15px;
        margin: 15px 0;
    }
    


    /* Meta Info */
    /* ซ้ำ
    .meta-info {
        font-size: 12px;
        color: #7f8c8d;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #ecf0f1;
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .meta-tags {
        font-size: 11px;
        color: #95a5a6;
        margin-top: 8px;
    }
    */
    
    /* Welcome Message */
    .welcome-message {
        text-align: center;
        padding: 40px 20px;
        color: #7f8c8d;
    }
    
    .welcome-message p {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    /* Loading Animation */
    .loading-spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-right: 10px;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* Recent Searches */
    .recent-searches {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }
    
    .recent-search-tag {
        background: #ecf0f1;
        color: #2c3e50;
        padding: 6px 12px;
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 12px;
    }
    
    .recent-search-tag:hover {
        background: #3498db;
        color: white;
        transform: translateY(-1px);
    }
    
    /* Responsive Design */
    @media (max-width: 768px) {
        body {
            padding: 10px;
            background: #667eea;
        }
        
        #app {
            border-radius: 15px;
        }
        
        h1 {
            padding: 20px;
            font-size: 24px;
            flex-direction: column;
            text-align: center;
            gap: 10px;
        }
        
        .search-container {
            padding: 20px;
        }
        
        #searchInput {
            padding: 15px;
            font-size: 16px;
        }
        
        .results-container {
            padding: 0 20px 20px;
        }
        
        .result-item {
            padding: 20px;
        }
        
        .chinese-char {
            font-size: 36px;
        }
        
        .character-header {
            flex-direction: column;
            gap: 15px;
        }
        
        .utility-buttons {
            justify-content: center;
        }
        
        .utility-btn {
            flex: 1;
            min-width: 140px;
            justify-content: center;
        }
    }
    
    @media (max-width: 480px) {
        h1 {
            font-size: 20px;
            padding: 15px;
        }
        
        .search-container {
            padding: 15px;
        }
        
        .result-item {
            padding: 15px;
        }
        
        .chinese-char {
            font-size: 32px;
        }
        
        .pinyin {
            font-size: 18px;
        }
    }
    
    /* Debug Info */
    .debug-info {
        font-size: 11px;
        color: #95a5a6;
        background: #f8f9fa;
        padding: 10px;
        border-radius: 8px;
        margin-top: 10px;
        border-left: 3px solid #95a5a6;
    }


/* ========================================= */
/* HANZI ANIMATOR STYLES */
/* ========================================= */

/* Modal Background */
#hanziAnimatorModal.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

/* Modal Content */
#hanziAnimatorModal .modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 520px;
    margin: 40px auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid #e0e0e0;
}

/* Close Button */
#hanziAnimatorModal .close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    font-weight: bold;
    transition: color 0.3s;
}

#hanziAnimatorModal .close:hover {
    color: #333;
}

/* Title */
#hanziAnimatorModal h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Character Display */
#hanziAnimatorModal .character-display {
    text-align: center;
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

#hanziAnimatorModal #targetCharacter {
    font-size: 120px;
    line-height: 1.2;
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: "SimSun", "STKaiti", "Microsoft YaHei", serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

#hanziAnimatorModal #pinyinDisplay {
    font-size: 26px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 5px;
}

#hanziAnimatorModal #meaningDisplay {
    font-size: 16px;
    color: #7f8c8d;
    font-style: italic;
}

/* Drawing Canvas */
#hanziAnimatorModal .drawing-area {
    text-align: center;
    margin: 25px 0;
}

#hanziAnimatorModal #hanziCanvas {
    border: 3px solid #bdc3c7;
    background: #ffffff;
    cursor: crosshair;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: border-color 0.3s;
}

#hanziAnimatorModal #hanziCanvas:hover {
    border-color: #3498db;
}

/* Controls */
#hanziAnimatorModal .animator-controls {
    margin: 25px 0;
    text-align: center;
}

#hanziAnimatorModal .animator-btn {
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 120px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#hanziAnimatorModal .animator-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    opacity: 0.95;
}

#hanziAnimatorModal .animator-btn:active {
    transform: translateY(-1px);
}

/* Specific button colors */
#hanziAnimatorModal #btnStartAnimation {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

#hanziAnimatorModal #btnClearCanvas {
    background: linear-gradient(135deg, #e67e22, #f39c12);
}

#hanziAnimatorModal #btnPlayAudio {
    background: linear-gradient(135deg, #2980b9, #3498db);
}

#hanziAnimatorModal #btnPracticeMode {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

/* Stroke Info */
#hanziAnimatorModal .stroke-info {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

#hanziAnimatorModal .stroke-info h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 18px;
}

#hanziAnimatorModal #strokeOrderDisplay {
    font-size: 18px;
    color: #2c3e50;
    font-weight: bold;
    line-height: 1.6;
    font-family: "SimSun", "STKaiti", monospace;
}

#hanziAnimatorModal #strokeCount {
    font-size: 15px;
    color: #7f8c8d;
    margin-top: 10px;
    font-style: italic;
}

/* Practice Stats */
#hanziAnimatorModal .practice-stats {
    margin-top: 20px;
    text-align: center;
    font-size: 15px;
    color: #7f8c8d;
    padding: 12px;
    background: #ecf0f1;
    border-radius: 6px;
    font-weight: bold;
}

#hanziContainer {
    width: 400px;
    height: 400px;
    border: 2px solid #3498db;
    background: white;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 600px) {
    #hanziAnimatorModal .modal-content {
        margin: 20px auto;
        padding: 20px;
        max-width: 90%;
    }
    
    #hanziAnimatorModal #targetCharacter {
        font-size: 80px;
    }
    
    #hanziAnimatorModal #hanziCanvas {
        width: 300px;
        height: 300px;
    }
    
    #hanziAnimatorModal .animator-btn {
        padding: 10px 15px;
        min-width: 100px;
        font-size: 14px;
        margin: 5px;
    }
}

/*  */

/* สไตล์สำหรับประเภทคำต่างๆ */
.word-class-noun { color: #2196f3; }
.word-class-verb { color: #4caf50; }
.word-class-adjective { color: #ff9800; }
.word-class-adverb { color: #9c27b0; }
.word-class-pronoun { color: #e91e63; }
.word-class-numeral { color: #795548; }
.word-class-preposition { color: #607d8b; }
.word-class-conjunction { color: #009688; }
.word-class-measure { color: #ff5722; }
.word-class-interjection { color: #f44336; }

/* Badge สำหรับประเภทคำ */
.type-badge {
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 8px;
}

.type-badge.compound {
        background: linear-gradient(135deg, #27ae60, #2ecc71);
}
    
.type-badge.character {
        background: linear-gradient(135deg, #3498db, #2980b9);
}

.type-badge.noun { background: #2196f3; }
.type-badge.verb { background: #4caf50; }
.type-badge.adjective { background: #ff9800; }
.type-badge.adverb { background: #9c27b0; }
.type-badge.pronoun { background: #e91e63; }
.type-badge.numeral { background: #795548; }
.type-badge.preposition { background: #607d8b; }
.type-badge.conjunction { background: #009688; }
.type-badge.measure { background: #ff5722; }
.type-badge.interjection { background: #f44336; }

/*  */

/* สำหรับแสดงผล meta info */
.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.meta-info span {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.meta-tags {
        font-size: 11px;
        color: #95a5a6;
        margin-top: 8px;
}

.tone-indicator {
    background: #e3f2fd;
    color: #1976d2;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 5px;
}



/*.  */

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.favorite-btn {
    transition: all 0.3s ease;
}

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

.favorite-btn:hover {
    transform: scale(1.1);
}

/*. */

.favorite-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn:hover {
    background-color: rgba(0,0,0,0.1);
}

.favorite-btn.active {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.favorite-btn:not(.active) {
    color: #95a5a6;
}

/* ทำให้หัวใจแสดงผลเป็นสัญลักษณ์หัวใจจริงๆ */
.favorite-btn::before {
    content: "♡";
}

.favorite-btn.active::before {
    content: "♥";
}


/* Add NavBar */

/* ========================================= */
/* DICTIONARY NAVIGATION - COMPLETE VERSION */
/* ========================================= */

.dict-nav {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #3498db;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dict-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* Left Side - Main Menu */
.dict-nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 100%;
}

.dict-nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dict-nav-link {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    height: 100%;
    white-space: nowrap;
    cursor: pointer;
}

.dict-nav-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-bottom-color: #3498db;
}

/* Right Side - User Section */
.dict-user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dict-user-status {
    color: #ecf0f1;
    font-size: 14px;
    font-weight: 500;
}

.dict-guest-user {
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
}

.dict-logged-in-user {
    background: rgba(46, 204, 113, 0.2);
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

/* Account Dropdown */
.dict-account-dropdown {
    position: relative;
}

.dict-account-toggle {
    background: rgba(255,255,255,0.1);
    color: #ecf0f1;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dict-account-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.dict-account-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-top: 5px;
    border: 1px solid #e0e0e0;
    z-index: 1001;
}

.dict-account-dropdown:hover .dict-account-menu {
    display: block;
    animation: slideDown 0.3s ease;
}

.dict-account-link {
    color: #2c3e50;
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dict-account-link:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.dict-account-link:last-child {
    border-bottom: none;
}

.dict-dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.dict-account-dropdown:hover .dict-dropdown-arrow {
    transform: rotate(180deg);
}

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

/* Responsive */
@media (max-width: 768px) {
    .dict-nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .dict-nav-list {
        flex-direction: column;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .dict-nav-item {
        width: 100%;
    }
    
    .dict-nav-link {
        padding: 15px 20px;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dict-user-section {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .dict-account-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid rgba(255,255,255,0.1);
        background: rgba(0,0,0,0.1);
    }
    
    .dict-account-link {
        color: #ecf0f1;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dict-account-link:hover {
        background: rgba(255,255,255,0.1);
        color: #3498db;
    }
}


/* Add Signin-Signup-Forgot Password */
/* ===== MEMBER FORM STYLES ===== */
.member-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.member-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.auth-container {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.auth-form {
    padding: 30px;
    background: white;
}

.form-icon {
    position: absolute;
    left: 15px;
    top: 12px;
    color: #ccc;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-control {
    padding-left: 40px;
    height: 45px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.btn-auth {
    background-color: #4e73df;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 5px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.btn-auth:hover {
    background-color: #2e59d9;
}

.btn-google {
    background-color: #dd4b39;
}

.btn-google:hover {
    background-color: #c23321;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 12px;
    cursor: pointer;
    color: #ccc;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #777;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider::before {
    margin-right: .5em;
}

.divider::after {
    margin-left: .5em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .member-form-container {
        padding: 10px;
    }
    
    .member-form {
        padding: 20px;
    }
    
    .auth-form {
        padding: 20px;
    }
}


/* เพิ่ม animation สำหรับการเปลี่ยนหน้า */
.search-system, #form-container {
    transition: opacity 0.3s ease-in-out;
}

.member-form-container {
    animation: fadeInUp 0.5s ease-out;
}

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

/* */
/* แก้ไขความกว้างของฟอร์มให้เท่ากัน */
.auth-form .form-control {
    width: 100% !important;
    box-sizing: border-box;
}

.auth-form .form-group {
    width: 100%;
}

.auth-form .btn-auth {
    width: 100%;
    box-sizing: border-box;
}

/* ตรวจสอบว่าไม่มี container อื่นมากำหนดความกว้าง */
.member-form-container .auth-form {
    width: 100%;
}

/* ปรับ padding และ margin ให้สม่ำเสมอ */
.auth-form {
    width: 100%;
    max-width: 400px; /* หรือตามที่ต้องการ */
    margin: 0 auto;
}

/* */
/* แก้ไขสไตล์ dropdown items ให้ไม่มีเส้นใต้ */
.dropdown-item {
    text-decoration: none !important;
    color: #333 !important;
    cursor: pointer;
    padding: 8px 16px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #333 !important;
    text-decoration: none !important;
}

/* ถ้าต้องการให้เป็นข้อความธรรมดาเลย (ไม่ใช่ลิงก์) */
.plain-dropdown-item {
    text-decoration: none !important;
    color: #333 !important;
    cursor: pointer;
    padding: 8px 16px;
    display: block;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.plain-dropdown-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #333;
}

/* */
/* ลบเส้นใต้ใน dropdown menu */
.dropdown-link.no-underline {
    text-decoration: none !important;
    color: #212529 !important;
    display: block;
    padding: 8px 16px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-link.no-underline:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    text-decoration: none !important;
}

/* สำหรับ Bootstrap dropdown */
.dropdown-menu .dropdown-link {
    text-decoration: none !important;
}

.dropdown-menu .dropdown-link:hover {
    text-decoration: none !important;
}

/* แก้ไขเฉพาะสำหรับเมนูบัญชีผู้ใช้ */
.navbar-nav .dropdown-menu .dropdown-link {
    text-decoration: none !important;
    background-image: none !important;
}

.navbar-nav .dropdown-menu .dropdown-link:hover {
    text-decoration: none !important;
    background-image: none !important;
}


/* Dashboard Styles */
.dashboard-container {
    display: none;
}

.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.dashboard-header {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}



/* Modal Styles */
/*
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.auth-form .form-group {
    margin-bottom: 15px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.auth-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}
*/


/* Modal Styles */
/*
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-container {
    background: white;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.auth-form .form-group {
    margin-bottom: 15px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.auth-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}
*/


/* ===== FIXED AUTH FORM STYLES ===== */
/* รีเซ็ตสไตล์สำหรับฟอร์มในหน้าเต็ม */
.auth-container .form-group {
    position: relative;
    margin-bottom: 20px;
}

.auth-container .form-icon {
    position: absolute;
    left: 15px;
    top: 12px;
    color: #ccc;
    z-index: 2;
}

.auth-container .form-control {
    padding-left: 40px !important;
    height: 45px;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100% !important;
    box-sizing: border-box;
}

.auth-container .password-toggle {
    position: absolute;
    right: 15px;
    top: 12px;
    cursor: pointer;
    color: #ccc;
    z-index: 2;
}

/* ปรับ checkbox ให้กลับมาเป็นสี่เหลี่ยมจัตุรัส */
.auth-container .form-check-input {
    width: 16px !important;
    height: 16px !important;
    margin-top: 0.2em !important;
}

.auth-container .form-check-label {
    margin-left: 8px;
}

/* สไตล์สำหรับ Modal โดยเฉพาะ (ไม่กระทบหน้าเต็ม) */
.modal-overlay .form-group {
    position: relative;
    margin-bottom: 20px;
}

.modal-overlay .form-icon {
    position: absolute;
    left: 15px;
    top: 12px;
    color: #ccc;
    z-index: 2;
}

.modal-overlay .form-control {
    padding-left: 40px !important;
    height: 45px;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 100% !important;
    box-sizing: border-box;
}

.modal-overlay .password-toggle {
    position: absolute;
    right: 15px;
    top: 12px;
    cursor: pointer;
    color: #ccc;
    z-index: 2;
}

/* ===== FORGOT PASSWORD MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-container {
    background: white;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 25px;
}

.modal-body .auth-form {
    padding: 0;
    background: none;
    box-shadow: none;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.modal-body input {
    width: 100%;
    padding: 12px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
    box-sizing: border-box;
}

.modal-body input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Message styles สำหรับ modal */
.modal-message {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.modal-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.modal-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive สำหรับ modal */
@media (max-width: 480px) {
    .modal-container {
        margin: 10px;
        max-width: none;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}


/* เอฟเฟกต์สำหรับลิงก์อัพเกรด */
.upgrade-link {
    background: linear-gradient(45deg, #FF6B6B, #FFE66D, #4ECDC4, #45B7D1) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: shimmer 2s infinite linear !important;
    background-size: 200% 100% !important;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.upgrade-link:hover {
    transform: scale(1.05) !important;
    transition: transform 0.3s ease !important;
}


/* ===== ENHANCED AUTH FORM STYLES ===== */
.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-form {
    padding: 50px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

/* Form Header */
.auth-form h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
    font-weight: 700;
    font-size: 2.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.auth-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Enhanced Form Groups */
.auth-form .form-group {
    position: relative;
    margin-bottom: 30px;
}

.auth-form .form-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.1em;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Enhanced Form Controls */
.auth-form .form-control {
    padding: 15px 20px 15px 50px;
    height: 55px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.auth-form .form-control:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.15),
        0 0 0 4px rgba(102, 126, 234, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.auth-form .form-control:focus + .form-icon {
    color: #764ba2;
    transform: translateY(-50%) scale(1.1);
}

/* Enhanced Password Toggle */
.auth-form .password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #adb5bd;
    font-size: 1.1em;
    z-index: 2;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 50%;
}

.auth-form .password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-50%) scale(1.1);
}

/* Enhanced Checkbox */
.auth-form .form-check {
    margin-bottom: 25px;
    padding-left: 35px;
}

.auth-form .form-check-input {
    width: 20px;
    height: 20px;
    margin-left: -35px;
    margin-top: 0.3em;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.auth-form .form-check-input:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.auth-form .form-check-label {
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-form .form-check-input:checked ~ .form-check-label {
    color: #2c3e50;
}

/* Enhanced Auth Button */
.auth-form .btn-auth {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    margin-top: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-form .btn-auth::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.6s;
}

.auth-form .btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 35px rgba(102, 126, 234, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.15);
}

.auth-form .btn-auth:hover::before {
    left: 100%;
}

.auth-form .btn-auth:active {
    transform: translateY(-1px);
    box-shadow: 
        0 5px 15px rgba(102, 126, 234, 0.4),
        0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Additional Links */
.auth-form .additional-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
}

.auth-form .text-center.mt-3 {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-form a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-form a:hover {
    color: #764ba2;
    text-decoration: none;
}

.auth-form a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.auth-form a:hover::after {
    width: 100%;
}

/* Message Alert Enhancement */
.auth-form .alert {
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.auth-form .alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left-color: #28a745;
    color: #155724;
}

.auth-form .alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left-color: #dc3545;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        max-width: none;
    }
    
    .auth-form {
        padding: 40px 30px;
    }
    
    .auth-form h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    
    .auth-form .form-control {
        height: 50px;
        font-size: 15px;
    }
    
    .auth-form .additional-links {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Animation for form elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form .form-group {
    animation: fadeInUp 0.6s ease-out;
}

.auth-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.auth-form .form-group:nth-child(2) { animation-delay: 0.2s; }
.auth-form .form-group:nth-child(3) { animation-delay: 0.3s; }
.auth-form .form-group:nth-child(4) { animation-delay: 0.4s; }
.auth-form .btn-auth { animation-delay: 0.5s; }

/* Floating label effect (optional enhancement) */
.auth-form .form-group {
    position: relative;
}

.auth-form .floating-label {
    position: absolute;
    left: 50px;
    top: 18px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 8px;
}

.auth-form .form-control:focus ~ .floating-label,
.auth-form .form-control:not(:placeholder-shown) ~ .floating-label {
    top: -8px;
    left: 45px;
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
}


/* เพิ่มใน style section */
.alert {
    transition: all 0.3s ease;
}

.alert i {
    margin-right: 8px;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Animation สำหรับ loading */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

