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

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
    color: var(--text-main);
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

/* Background blob decorations */
.blob {
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--primary);
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.3;
}

.blob-1 { top: -50px; left: -50px; }
.blob-2 { bottom: -50px; right: -50px; background: var(--accent); }

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

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

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.counter-container {
    margin-bottom: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.counter-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--primary);
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    color: var(--text-main);
    font-size: 1rem;
    resize: none;
    min-height: 120px;
    transition: all 0.3s ease;
    outline: none;
}

textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.char-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
}

textarea::placeholder {
    color: #4b5563;
}

.send-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.send-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #4b5563;
}

.status-msg {
    margin-top: 20px;
    font-size: 0.9rem;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.status-msg.show {
    opacity: 1;
}

.status-msg.success { color: var(--accent); }
.status-msg.error { color: var(--error); }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
    }
    h1 {
        font-size: 1.75rem;
    }
}
