/* Пастельная розовая палитра - минимализм + премиум дизайн + ЧИТАБЕЛЬНОСТЬ */
:root {
    --primary: #FF9FB0;
    --primary-dark: #FF7A92;
    --primary-light: #FFD4DB;
    --secondary: #DDD5F3;
    --background: #FFF8FA;
    --surface: #FFFFFF;
    --text: #2D2D2D;
    --text-light: #6B6B6B;
    --border: #FFE4E9;
    --shadow: rgba(255, 122, 146, 0.15);
    --shadow-lg: rgba(255, 122, 146, 0.25);
    --success: #A0D8A0;
    --error: #FFB8B8;
    --gradient-1: linear-gradient(135deg, #FF9FB0 0%, #DDD5F3 100%);
    --gradient-2: linear-gradient(135deg, #FFD4DB 0%, #FFFFFF 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.75;
    font-size: 16px;
}

/* Контейнеры */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px var(--shadow);
    margin-bottom: 24px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 48px var(--shadow-lg);
    transform: translateY(-2px);
}

.card-gradient {
    background: var(--gradient-2);
}

/* Заголовки - УЛУЧШЕНА ЧИТАБЕЛЬНОСТЬ */
h1, h2, h3 {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

h1 {
    font-size: 3.2rem;
    text-align: center;
    color: var(--primary-dark);
}

h2 {
    font-size: 2.4rem;
}

h3 {
    font-size: 1.75rem;
}

/* Иконки */
.icon {
    margin-right: 8px;
    color: var(--primary);
}

.icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Кнопки - УЛУЧШЕНА ЧИТАБЕЛЬНОСТЬ */
.btn {
    background: var(--primary-dark);
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px var(--shadow);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px var(--shadow-lg);
}

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

.btn-secondary {
    background: var(--secondary);
    color: var(--text);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

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

.btn-large {
    padding: 20px 52px;
    font-size: 1.3rem;
    font-weight: 700;
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Инпуты - УЛУЧШЕНА ЧИТАБЕЛЬНОСТЬ */
input[type="text"],
input[type="url"],
input[type="password"],
textarea {
    width: 100%;
    padding: 16px 22px;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-size: 1.1rem;
    background: var(--surface);
    color: var(--text);
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.5;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 182, 193, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Header */
.header {
    background: var(--surface);
    padding: 20px 0;
    box-shadow: 0 2px 16px var(--shadow);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Room Card */
.room-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 16px var(--shadow);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.room-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.room-card:hover::before {
    transform: scaleX(1);
}

.room-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px var(--shadow-lg);
}

.room-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-2);
    color: var(--primary-dark);
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.room-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.4;
}

.room-members {
    color: var(--text);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--background);
}

.login-card {
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.login-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Loading Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 24px;
    padding: 35px;
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

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

.modal-close {
    background: var(--primary-light);
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-dark);
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Alert/Info Boxes - УЛУЧШЕНА ЧИТАБЕЛЬНОСТЬ */
.alert {
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    font-size: 1.05rem;
    line-height: 1.6;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: var(--success);
    color: #2d5016;
}

.alert-error {
    background: var(--error);
    color: #8b0000;
}

.alert-info {
    background: var(--secondary);
    color: var(--text);
}

/* Feature List - УЛУЧШЕНА ЧИТАБЕЛЬНОСТЬ */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 14px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
}

.feature-list li i {
    color: var(--primary-dark);
    font-size: 1.4rem;
    min-width: 24px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-5 { gap: 5px; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

.hidden {
    display: none !important;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--gradient-1);
    color: white;
}

.badge-secondary {
    background: var(--secondary);
    color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .btn-large {
        padding: 14px 32px;
        font-size: 1rem;
    }

    .card {
        padding: 24px;
        border-radius: 20px;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--text);
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    margin-bottom: 8px;
}

.tooltip:hover::after {
    opacity: 1;
}
