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

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

.container {
    background: white;
    border-radius: 32px;
    padding: 24px 20px 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
}

.step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step.active {
    display: block;
}

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

h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #333;
}

h3 {
    font-size: 1.3rem;
    margin: 20px 0;
    color: #667eea;
}

.hint {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.small-hint {
    color: #888;
    font-size: 0.75rem;
    margin-top: 20px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 8px;
    min-width: 140px;
}

.btn-primary {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

.button-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Убегающая кнопка */
#noBtn {
    position: relative;
    transition: all 0.2s ease;
}

/* Поле ввода */
.input-group {
    display: flex;
    align-items: center;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 4px 16px;
    margin: 20px 0;
}

.input-prefix {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
}

.input-group input {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

.event-link-group {
    margin: 20px 0;
    text-align: left;
}

.event-link-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.event-link-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
}

.event-link-group input:focus {
    border-color: #667eea;
}

/* Ссылка */
.link-container {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}

.link-container input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    outline: none;
}

.btn-copy {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Календарь */
.datetime-input {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin: 20px 0;
    font-family: inherit;
}

/* Карточка мероприятия */
.event-preview-container {
    margin: 20px 0;
}

.event-preview {
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.event-image {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

.event-info {
    padding: 12px 16px;
    text-align: left;
}

.event-site {
    font-size: 0.7rem;
    color: #667eea;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.event-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
}

.event-description {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-link {
    font-size: 0.75rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.event-link:hover {
    text-decoration: underline;
}

.loading-preview {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

.event-link-simple {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f4ff;
    border-radius: 16px;
    padding: 12px 16px;
    margin: 16px 0;
    border: 1px solid #e0e7ff;
    text-align: left;
}

.link-icon {
    font-size: 28px;
    background: #667eea20;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.link-info {
    flex: 1;
}

.link-label {
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.event-url {
    font-size: 0.85rem;
    color: #4a5568;
    text-decoration: none;
    word-break: break-all;
    line-height: 1.3;
}

.event-url:hover {
    text-decoration: underline;
    color: #667eea;
}

.success-animation {
    font-size: 4rem;
    margin: 20px 0;
    animation: bounce 0.5s ease;
}

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

@media (max-width: 480px) {
    .container {
        padding: 20px 16px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px;
        min-width: 120px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 12px;
    }
}