/* Cute Modal - Theme-aware Colors */
/* Uses CSS variables from themes.css with dark theme fallbacks */
:root {
    --cute-bg: var(--bg-elevated, #1e293b);
    --cute-bg-alt: var(--bg-card, #334155);
    --cute-input-bg: var(--bg-surface, rgba(255, 255, 255, 0.1));
    --cute-text: var(--text-primary, #e2e8f0);
    --cute-text-muted: var(--text-secondary, #94a3b8);
    --cute-radius: 20px;
    --cute-btn-gradient: var(--gradient-hover, linear-gradient(135deg, #4ECDC4 0%, #2ECC71 100%));
    --cute-accent: var(--primary, #4ECDC4);
    --cute-border: var(--border-color, rgba(255, 255, 255, 0.1));
}

.cute-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.cute-modal-overlay.active {
    display: flex;
}

.cute-modal-content {
    background: var(--cute-bg);
    border-radius: var(--cute-radius);
    width: 100%;
    max-width: 420px;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    border: 2px solid #fff;
    text-align: center;
}

.cute-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #546E7A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 1000;
    /* Ensure button is on top */
}

.cute-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cute-modal-close.red {
    background: #FF5252;
    color: white;
    width: 28px;
    height: 28px;
    font-size: 18px;
}

.cute-modal-header {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.cute-logo {
    max-height: 180px;
    /* Increased from 80px back to large size */
    object-fit: contain;
    display: block;
    margin: 0 auto 15px auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.cute-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--cute-text);
    margin: 5px 0 15px 0;
    /* Add bottom margin to separate from inputs */
    text-align: center;
}

.cute-form-group {
    margin-bottom: 16px;
    text-align: left;
}

.cute-label {
    display: block;
    font-size: 14px;
    color: var(--cute-text);
    margin-bottom: 6px;
    font-weight: 500;
}

.cute-input-wrapper {
    position: relative;
}

.cute-input {
    width: 100%;
    background: var(--cute-input-bg);
    border: none;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 16px;
    color: #263238;
    outline: none;
    transition: all 0.2s;
    font-family: 'Kanit', sans-serif;
}

.cute-input:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.cute-input::placeholder {
    color: #90A4AE;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #90A4AE;
    cursor: pointer;
    font-size: 18px;
}

.cute-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--cute-text);
}

.cute-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.cute-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #B0BEC5;
    appearance: none;
    background: white;
    position: relative;
    cursor: pointer;
}

.cute-checkbox:checked {
    background: var(--cute-accent, #2ECC71);
    border-color: var(--cute-accent, #2ECC71);
}

.cute-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cute-link {
    color: var(--cute-text);
    text-decoration: underline;
}

.cute-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cute-btn.primary {
    background: #90A4AE;
    color: white;
}

.cute-btn.primary:not(:disabled):hover {
    background: #78909C;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.cute-btn.register {
    background: var(--cute-btn-gradient);
    color: white;
}

.cute-lang-switch {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.lang-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.lang-btn:hover {
    transform: scale(1.1);
}

.lang-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    border-radius: var(--cute-radius);
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Character count specific */
.char-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #90A4AE;
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
}