@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 0 20px 0;
    line-height: 1.5;
}

/* Account System Styles */
.account-bar {
    max-width: 1120px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 8px;
}

.container {
    max-width: 1120px;
    width: 100%;
    margin-top: 2px;
    padding: 12px;
}

.sentence-counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
    display: none;
    flex-shrink: 0;
}


.account-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin-left: auto;
}

.account-btn {
    padding: 4px 0;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(255, 255, 255, 0.3);
}

.account-btn:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration-color: rgba(255, 255, 255, 0.8);
}

.account-btn.primary {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    text-decoration-color: rgba(255, 255, 255, 0.3);
}

.account-btn.primary:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration-color: rgba(255, 255, 255, 0.8);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: modalSlideIn 0.3s ease;
    transform: translateY(-50%);
    top: 38%;
}

.modal-content.achievements {
    width: 95%;
    max-width: 1000px;
    min-height: 500px;
}

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

.close {
    color: #aaa;
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #666;
}

.auth-container {
    padding: 32px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 0;
    color: #718096;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-submit-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.auth-submit-btn.danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.auth-message {
    margin-top: 16px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.auth-message.success {
    background: #f0fff4;
    color: #38a169;
    border: 1px solid #c6f6d5;
}

.auth-message.error {
    background: #fed7d7;
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

.forgot-password-link {
    text-align: center;
    margin-top: 16px;
}

.forgot-password-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.forgot-password-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Limit Modal Styles */
.limit-container {
    padding: 24px 32px;
    text-align: center;
}

.limit-container h3 {
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 24px;
}

.limit-container p {
    color: #4a5568;
    margin-bottom: 24px;
    line-height: 1.6;
}

.limit-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Limit Modal Auth Form */
.limit-auth-container {
    margin-top: 20px;
    margin-bottom: 0;
}

.limit-auth-tabs {
    display: flex;
    margin-bottom: 20px;
    background: #f7fafc;
    border-radius: 8px;
    padding: 4px;
}

.limit-auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.limit-auth-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.limit-auth-container .auth-message {
    display: none;
    margin-bottom: 0;
}

.limit-auth-container .auth-message:not(:empty) {
    display: block;
    margin-top: 12px;
    padding: 8px 12px;
}

.limit-auth-container form {
    margin-bottom: 0;
}

.limit-actions .account-btn {
    padding: 8px 0;
    background: none;
    color: #333;
    border: none;
    font-weight: 400;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.limit-actions .account-btn:hover {
    color: #000;
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

@media (max-width: 768px) {
    body {
        padding: 32px 0 32px 0;
    }
    
    .account-bar {
        width: 95%;
        padding: 0 12px;
        margin-bottom: 16px;
    }
    
    .sentence-counter {
        font-size: 14px;
    }
    
    .account-actions {
        gap: 10px;
        flex-shrink: 0;
    }
    
    .account-btn {
        font-size: 13px;
    }
    
    .container {
        padding: 0;
        margin-top: 0;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .limit-actions {
        gap: 8px;
    }
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 50px;
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.1),
        0 2px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    min-height: 580px;
    display: flex;
    flex-direction: column;
}


.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: none;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}


.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    min-width: 40px;
    text-align: center;
}

.english-sentence {
    text-align: center;
    margin-bottom: 18px;
    flex-shrink: 0;
}

#englishText {
    font-size: 1.6rem;
    color: #2d3748;
    line-height: 1.4;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.reordered-text {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
    opacity: 0.8;
}

.game-area {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    flex: 0 1 auto;
}

.progress-sentence {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
    min-height: 50px;
    padding: 14px 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    transition: all 0.3s ease;
    align-items: center;
}

.progress-placeholder {
    padding: 12px 16px;
    background: rgba(226, 232, 240, 0.5);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #94a3b8;
    min-width: 70px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-placeholder.current {
    animation: subtlePulse 1s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06);
    }
}

.progress-word {
    padding: 12px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    animation: slideIn 0.4s ease-out;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
}

.progress-word:hover {
    background: linear-gradient(135deg, #0fa970 0%, #058f5e 100%);
}

.progress-word:hover::after {
    content: attr(data-english);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out forwards;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}



@keyframes slideIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.word-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 14px;
    align-content: flex-start;
    min-height: 60px;
}

.word-card {
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    user-select: none;
    transition: background 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    text-align: center;
    display: inline-block;
}


.word-card:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #63739c 100%);
}

.word-card:active {
    transform: translateY(1px);
}


.word-card.used {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    color: #718096;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}


.word-card.incorrect {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}


.thai-container {
    margin-top: 12px;
    text-align: center;
    padding: 14px 14px 0 14px;
}

.thai-container-completion {
    margin-bottom: 14px;
    text-align: center;
    padding: 12px 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.thai-display {
    display: inline;
    margin-right: 0;
    font-size: 1.6rem;
    color: #2d3748;
    font-family: 'Arial Unicode MS', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.sound-button {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    color: white;
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}


/* Tip Container */
.tip-container {
    margin-top: 14px;
    margin-bottom: 18px;
    padding: 12px 16px;
    background: #fef7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tip-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
    color: #ea580c;
    margin-top: 1px;
}

.tip-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #9a3412;
    font-weight: 450;
    flex: 1;
}


/* Manual Input Styles */
.manual-input-area {
    margin-bottom: 14px;
    padding: 4px 20px;
    background: transparent;
    border-radius: 12px;
    border: none;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.manual-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}


.manual-input {
    padding: 12px 16px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    width: 300px;
    max-width: 100%;
    background: white;
    transition: all 0.3s ease;
}

.manual-input:focus {
    outline: none;
    border-color: #d1d5db;
    box-shadow: none;
}

.submit-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.submit-button:hover {
    background: linear-gradient(135deg, #0fa970 0%, #058f5e 100%);
}

.submit-button:active {
    transform: translateY(1px);
}

.submit-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.submit-button.incorrect {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.submit-button.api-limit {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
}

.submit-button.usage-limit {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    cursor: not-allowed;
}

/* Error Message Styles */
.error-message {
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border: 1px solid #f56565;
    border-radius: 8px;
    color: #c53030;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    animation: errorSlideIn 0.3s ease-out;
}

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


.buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
    padding-top: 8px;
    padding-bottom: 10px;
}

button {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}


.next-sentence-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    margin-bottom: 35px;
    flex-shrink: 0;
}

#newSentenceBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    width: 60%;
    max-width: 300px;
    min-width: 180px;
    font-size: 1rem;
    padding: 18px 24px;
    font-weight: 600;
    border-radius: 10px;
}


#newSentenceBtn:hover:not(.disabled) {
    background: linear-gradient(135deg, #5a67d8 0%, #63739c 100%);
}


#newSentenceBtn.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}


#newSentenceBtn.disabled:hover {
    background: #e5e7eb;
}




#toggleModeBtn {
    background: rgba(255, 255, 255, 0.1);
    color: #6b7280;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    min-width: 100px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

#autoCompleteBtn, #toggleModeBtn, #toggleThaiBtn, #toggleEnglishBtn, #toggleTipBtn, #toggleAutoPlayBtn {
    background: rgba(255, 255, 255, 0.1);
    color: #6b7280;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    min-width: 100px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

#autoCompleteBtn:hover, #toggleModeBtn:hover, #toggleThaiBtn:hover, #toggleEnglishBtn:hover, #toggleTipBtn:hover, #toggleAutoPlayBtn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #4b5563;
    border-color: rgba(0, 0, 0, 0.15);
}

#autoCompleteBtn:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

#autoCompleteBtn:disabled:hover {
    color: #9ca3af;
}


@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 12px;
    }
    
    .card {
        padding: 20px 16px;
        border-radius: 16px;
        min-height: 400px;
    }
    
    #englishText {
        font-size: 1.4rem;
        margin-bottom: 16px;
    }
    
    .reordered-text {
        font-size: 1rem;
    }
    
    .progress-container {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    
    .progress-sentence {
        padding: 12px 10px;
        margin-bottom: 16px;
        min-height: 50px;
        gap: 6px;
    }
    
    .word-cards {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .word-card {
        font-size: 0.9rem;
        padding: 10px 14px;
        min-width: 70px;
    }
    
    .thai-container-completion {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 12px 16px;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .thai-display {
        font-size: 1.3rem;
        margin-right: 0;
        display: inline;
        line-height: 1.2;
    }
    
    .sound-button {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        flex-shrink: 0;
        margin-left: 4px;
    }
    
    .buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 8px;
    }
    
    button {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: unset;
        flex: unset;
    }
    
    .tip-container {
        margin-top: 12px;
        margin-bottom: 16px;
        padding: 8px 12px;
    }
    
    .tip-text {
        font-size: 0.8rem;
    }
    
    .next-sentence-container {
        margin-bottom: 8px;
        gap: 8px;
    }
    
    #newSentenceBtn {
        width: calc(100% - 72px);
        max-width: none;
        min-width: unset;
        font-size: 0.9rem;
        padding: 16px 20px;
    }
    
}

@media (max-width: 480px) {
    body {
        padding: 24px 8px;
    }
    
    .account-bar {
        padding: 0 8px;
        margin-bottom: 12px;
    }
    
    .container {
        padding: 0;
    }
    
    .card {
        padding: 16px 12px;
        min-height: 350px;
    }
    
    #englishText {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }
    
    .reordered-text {
        font-size: 0.9rem;
    }
    
    .progress-container {
        padding: 10px 12px;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .progress-sentence {
        padding: 10px 8px;
        gap: 6px;
        min-height: 45px;
        margin-bottom: 12px;
    }
    
    .progress-placeholder {
        padding: 8px 10px;
        min-width: 45px;
        font-size: 0.75rem;
    }
    
    .progress-word {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .word-cards {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .word-card {
        font-size: 0.8rem;
        padding: 8px 12px;
        min-width: 60px;
    }
    
    .thai-container-completion {
        min-height: 50px;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .thai-container-completion {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 10px 12px;
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .thai-display {
        font-size: 1.2rem;
        margin-right: 0;
        display: inline;
        line-height: 1.2;
    }
    
    .sound-button {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        border-radius: 50%;
        flex-shrink: 0;
        margin-left: 4px;
    }
    
    .buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-top: 6px;
    }
    
    button {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: unset;
        flex: unset;
    }
    
    .tip-container {
        margin-top: 10px;
        margin-bottom: 12px;
        padding: 6px 10px;
    }
    
    .tip-text {
        font-size: 0.75rem;
    }
    
    .manual-input {
        width: 100%;
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .manual-input-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .submit-button {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .next-sentence-container {
        margin-bottom: 6px;
        gap: 6px;
    }
    
    #newSentenceBtn {
        width: calc(100% - 62px);
        max-width: none;
        min-width: unset;
        font-size: 0.8rem;
        padding: 10px 16px;
    }
    
}

/* Achievement Notification Styles */
/* Achievement notification container */
.achievement-notifications {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.achievement-badge {
    background: #ffffff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    animation: slideInRight 0.3s ease-out;
    width: 280px;
    min-height: 60px;
    border: 1px solid #e2e8f0;
    margin-bottom: 8px;
    pointer-events: auto;
    transition: transform 0.2s ease;
    box-sizing: border-box;
}


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

.achievement-badge-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2d3748;
}

.achievement-badge-icon {
    width: 28px;
    height: 28px;
    background: #10b981;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    font-weight: bold;
}

.achievement-badge-text {
    flex: 1;
}

.achievement-badge-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    color: #2d3748;
    line-height: 1.2;
}

.achievement-badge-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.3;
}

.achievement-badge-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.achievement-badge-close:hover {
    color: #64748b;
}

/* Achievements Modal Styles */
.achievements-container {
    text-align: center;
    padding: 20px 24px;
}

.achievements-container h3 {
    margin-bottom: 16px;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 4px;
}

.achievement-card {
    background: #fafbfc;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.achievement-card.unlocked {
    background: #ffffff;
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.achievement-card.locked {
    opacity: 0.5;
    background: #f8fafc;
}

.achievement-status {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.achievement-card.unlocked .achievement-status {
    background: #10b981;
    color: white;
}

.achievement-card.locked .achievement-status {
    background: #e2e8f0;
    color: #94a3b8;
}

.achievement-info {
    flex: 1;
    text-align: left;
}

.achievement-title {
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 3px;
}

.achievement-description {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    line-height: 1.2;
}

.achievement-progress {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
}

.checkmark {
    font-size: 18px;
}

.progress-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
}

/* Mobile responsiveness for achievement styles */
@media (max-width: 768px) {
    .modal-content.achievements {
        width: 95%;
        min-height: 450px;
    }
    
    .achievement-notifications {
        right: 10px;
    }
    
    .achievement-badge {
        width: 260px;
        min-height: 56px;
        padding: 10px;
    }
    
    
    .achievement-badge-title {
        font-size: 14px;
    }
    
    .achievement-badge-desc {
        font-size: 12px;
    }
    
    .achievements-container {
        padding: 20px 16px;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .achievement-card {
        padding: 14px;
    }
    
    .achievements-container h3 {
        font-size: 20px;
        margin-bottom: 16px;
    }
}

