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

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

:root {
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F5F9;
    --bg-elevated: #FFFFFF;
    --primary: #009dd5bf;
    --primary-hover: #009dd5d1;
    --primary-glow: rgba(0, 82, 255, 0.15);
    --accent: #FF5C00;
    --accent-hover: #E65200;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --border: #E2E8F0;
    --border-hover: #CBD5E1;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --glow: 0 0 20px var(--primary-glow);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

header {
    background: var(--bg-secondary);
    padding: 1.0rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header > div:first-child {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header img {
    height: 90px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

header > div:first-child > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, #0066FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.score {
    background: linear-gradient(135deg, var(--accent) 0%, #FF7A33 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 0 20px rgba(255, 92, 0, 0.3);
}

.screen {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
}

.hidden {
    display: none;
}

.icon-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.icon-btn svg {
    display: block;
}

.onboarding-step {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.onboarding-step h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.onboarding-step p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

button {
    background: linear-gradient(135deg, var(--primary) 0%, #0066FF 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    box-shadow: 0 0 20px rgba(0, 82, 255, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 82, 255, 0.5), var(--shadow-lg);
}

#start-assessment, #start-learning, #login-btn, #register-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    margin-top: 1rem;
    width: 100%;
}

.question {
    text-align: left;
    margin-bottom: 2rem;
}

.question h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

#question-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    padding: 1rem;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 10px;
    text-align: left;
    font-weight: 500;
    transition: all 0.2s ease;
}

.option-btn:hover {
    border-color: var(--primary);
    background: var(--bg-elevated);
    transform: translateY(-1px);
    box-shadow: none;
}

.assessment-progress {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.user-info strong {
    color: var(--primary);
}

.environments-grid, .rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.environment-card, .room-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.environment-card:hover, .room-card:hover {
    border-color: var(--primary);
    background: var(--bg-elevated);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 82, 255, 0.2);
}

.env-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 82, 255, 0.3));
}

.environment-card h3, .room-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.environment-card p, .room-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.room-header, .conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

#back-to-env, #back-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

#back-to-env:hover, #back-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: none;
}

.chat-container {
    height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-primary);
}

.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    max-width: 75%;
    line-height: 1.5;
}

.message.ai {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 85%;
}

.message.ai .message-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.message.ai .message-text {
    flex: 1;
    color: var(--text-primary);
}

.message.ai .message-text span.highlight {
    background: #FEF08A;
    border-radius: 3px;
    padding: 0 2px;
}

.example-text span.highlight {
    background: #FEF08A;
    border-radius: 3px;
    padding: 0 2px;
}

.speak-btn.playing svg, .word-speak-btn.playing svg, .example-speak-btn.playing svg {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.message.ai .help-btn, .message.ai .speak-btn, .message.ai .practice-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--primary);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    padding: 0.375rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message.ai .help-btn:hover, .message.ai .speak-btn:hover, .message.ai .practice-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.message.user {
    background: linear-gradient(135deg, var(--primary) 0%, #0066FF 100%);
    color: white;
    margin-left: auto;
    box-shadow: var(--glow);
}

.message.system {
    background: rgba(234, 179, 8, 0.1);
    color: #fbbf24;
    text-align: center;
    max-width: 100%;
    font-style: italic;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.help-explanation {
    background: rgba(0, 82, 255, 0.05);
    border: 1px solid rgba(0, 82, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.875rem;
    width: 100%;
}

.help-explanation h5 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
    font-weight: 600;
}

.help-explanation .translation {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.input-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#user-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

#user-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

#user-input::placeholder {
    color: var(--text-tertiary);
}

#help-response-btn {
    background: var(--bg-tertiary);
    border: 1px solid rgba(234, 179, 8, 0.5);
    color: #fbbf24;
    padding: 0.875rem;
}

#help-response-btn:hover {
    background: rgba(234, 179, 8, 0.2);
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.2);
}

#send-btn {
    padding: 0.875rem 1.5rem;
}

#mic-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.875rem;
}

#mic-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 20px rgba(255, 92, 0, 0.3);
}

.response-helper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid var(--border);
}

.response-helper::-webkit-scrollbar {
    width: 8px;
}

.response-helper::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

.response-helper::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.helper-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0066FF 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.helper-header h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.helper-header .icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    padding: 0.375rem;
}

.helper-header .icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.helper-content {
    padding: 1.5rem;
}

.helper-step {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.helper-step:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 82, 255, 0.1);
}

.helper-step h5 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.helper-step button {
    margin-top: 0.75rem;
    margin-right: 0.5rem;
}

#practice-response {
    width: 100%;
    min-height: 100px;
    padding: 0.875rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    resize: vertical;
    transition: all 0.2s ease;
}

#practice-response:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

#practice-response::placeholder {
    color: var(--text-tertiary);
}

.helper-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.vocabulary-item {
    display: inline-block;
    background: rgba(0, 82, 255, 0.08);
    color: var(--primary);
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 82, 255, 0.2);
}

.vocabulary-item:hover {
    background: rgba(0, 82, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 255, 0.2);
    border-color: var(--primary);
}

.idea-item {
    background: rgba(0, 82, 255, 0.05);
    border: 1px solid rgba(0, 82, 255, 0.2);
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 10px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 500;
}

.idea-item:hover {
    background: rgba(0, 82, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 82, 255, 0.15);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.selectable-text {
    cursor: text;
    user-select: text;
}

.word-tooltip {
    animation: fadeIn 0.2s ease;
}

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

.loading {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    animation: slideInRight 0.3s ease;
}

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

.loading.hidden {
    display: none !important;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 82, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading::after {
    content: 'Procesando...';
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.api-config {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

#api-key {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

#api-key:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.api-config small {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .screen {
        padding: 1rem;
    }
    
    .onboarding-step h2 {
        font-size: 1.5rem;
    }
    
    .environments-grid, .rooms-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .environment-card, .room-card {
        padding: 1.5rem;
    }
    
    .chat-container {
        height: 60vh;
        padding: 1rem;
    }
    
    .message {
        max-width: 90%;
        font-size: 0.875rem;
    }
    
    .message.ai {
        max-width: 95%;
    }
    
    .input-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    #user-input {
        flex: 1 1 100%;
        min-width: 0;
    }
    
    #help-response-btn, #send-btn {
        flex: 1;
    }
    
    .response-helper {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .helper-header {
        padding: 1rem;
        border-radius: 12px 12px 0 0;
    }
    
    .helper-header h4 {
        font-size: 1rem;
    }
    
    .helper-content {
        padding: 1rem;
    }
    
    .helper-step {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .helper-buttons {
        flex-direction: column;
    }
    
    .helper-buttons button {
        width: 100%;
    }
    
    .conversation-header h3 {
        font-size: 0.875rem;
    }
    
    .room-header h3 {
        font-size: 1rem;
    }
    
    .user-info {
        font-size: 0.75rem;
        padding: 0.75rem 1rem;
    }
    
    .vocabulary-item {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .icon-btn {
        padding: 0.5rem;
    }
    
    .icon-btn svg {
        width: 18px;
        height: 18px;
    }
}

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

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

/* Modal de suscripción */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0066FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 82, 255, 0.25);
}

.plan-card.recommended {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.08) 0%, rgba(0, 102, 255, 0.04) 100%);
    position: relative;
    padding-top: 2.5rem;
}

.plan-card.current-plan {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent) 0%, #FF7A33 100%);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 92, 0, 0.4);
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.plan-price small {
    font-size: 1rem;
    color: var(--text-secondary);
}

.plan-messages {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.plan-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.plan-features li::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
    margin-right: 0.5rem;
}

.plan-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0066FF 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 82, 255, 0.4);
}

#message-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#message-counter.hidden {
    display: none !important;
}

#message-counter.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    animation: pulse 2s infinite;
}

#message-counter.danger {
    background: linear-gradient(135deg, var(--accent) 0%, #FF7A33 100%);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Skeleton Loader */
.skeleton-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 9999;
    animation: fadeOut 0.3s ease 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

.skeleton-logo {
    width: 90px;
    height: 90px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-counter {
    width: 200px;
    height: 36px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

.skeleton-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
}

.skeleton-title {
    width: 60%;
    height: 32px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin: 0 auto 1rem;
}

.skeleton-text {
    width: 100%;
    height: 20px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.skeleton-text.short {
    width: 70%;
    margin: 0 auto 2rem;
}

.skeleton-button {
    width: 100%;
    height: 48px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 10px;
    margin-top: 1rem;
}

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

/* Country selector */
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.country-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #ff9800;
    font-size: 0.875rem;
    text-align: left;
    animation: slideDown 0.3s ease;
}

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