:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --success: #10b981;
    --danger: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
}

/* RTL positioning for switcher */
html[dir="rtl"] .lang-switcher {
    right: auto;
    left: 1rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.lang-btn:hover {
    background: white;
    color: var(--primary);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg-gradient);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 1.5rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s ease;
}

h1 {
    font-size: 1.875rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #4f46e5, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

input[type="text"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.btn:hover {
    background: var(--primary-hover);
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--text-main);
    box-shadow: none;
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* Radio buttons for time selection */
.time-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.time-option {
    position: relative;
    cursor: pointer;
}

.time-option input {
    display: none;
}

.time-card {
    padding: 0.75rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
}

.time-option input:checked+.time-card {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

/* Generated Links Section */
.link-box {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    border: 1px solid #e5e7eb;
}

.link-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.link-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link-url {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #eee;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.875rem;
}

.copy-btn:hover {
    text-decoration: underline;
}

/* Message Styles */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.message-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.message-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.message-content {
    white-space: pre-wrap;
    line-height: 1.5;
    color: var(--text-main);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
    font-style: italic;
}

.timer-badge {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    padding: 0.5rem;
    border-radius: 20px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }
}