/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #ffb7c5;
    --secondary-color: #ffdfd3;
    --accent-color: #d291bc;
    --text-color: #7c4d4d;
    --light-color: #fff5f5;
    --dark-color: #5d4037;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--light-color);
}

.auth-links a {
    background-color: var(--accent-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    margin-left: 15px;
}

.auth-links a:hover {
    background-color: var(--dark-color);
    color: white;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Герой секция */
.hero {
    padding: 80px 0;
    text-align: center;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23ffb7c5" opacity="0.5"/></svg>');
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Особенности */
.features {
    padding: 80px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--dark-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--light-color);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 50px;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* Популярные торты */
.popular-cakes {
    padding: 80px 0;
}

.cake-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.cake-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.cake-card:hover {
    transform: translateY(-10px);
}

.cake-img {
    height: 200px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.cake-info {
    padding: 20px;
}

.cake-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.cake-info p {
    margin-bottom: 15px;
}

.price {
    font-size: 22px;
    font-weight: bold;
    color: var(--accent-color);
}

/* Форма авторизации */
.auth-container {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.auth-left::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.auth-left h1 {
    font-size: 28px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.auth-left p {
    font-size: 16px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.cake-icon {
    font-size: 100px;
    text-align: center;
    margin-top: 40px;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

.auth-right {
    flex: 1;
    background: white;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-form {
    width: 100%;
    max-width: 400px;
}

.auth-form h2 {
    color: var(--dark-color);
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 183, 197, 0.2);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me input {
    margin-right: 10px;
}

.remember-me label {
    color: var(--dark-color);
    font-size: 14px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 183, 197, 0.4);
}

.auth-links-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.auth-links-bottom a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-links-bottom a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

/* Каталог */
.catalog {
    padding: 40px 0;
}

.filters {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.filter-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background-color: var(--light-color);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
}

.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.catalog-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.catalog-item:hover {
    transform: translateY(-5px);
}

.catalog-img {
    height: 180px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.catalog-info {
    padding: 15px;
}

.catalog-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.catalog-info p {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.catalog-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.order-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 8px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.order-btn:hover {
    opacity: 0.9;
}

/* Футер */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 40px;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    background-color: var(--primary-color);
}

.contact-info {
    list-style: none;
}

.contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Анимации */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Адаптивность */
@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-left, .auth-right {
        padding: 30px;
    }
    
    .cake-icon {
        font-size: 70px;
        margin-top: 20px;
    }
    
    .nav-links {
        position: absolute;
        right: 0;
        height: 100vh;
        top: 0;
        background-color: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 99;
    }
    
    .nav-links li {
        margin: 25px 0;
    }
    
    .burger {
        display: block;
        z-index: 100;
    }
    
    .nav-active {
        transform: translateX(0%);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 30px;
    }
    
    .feature-grid, .cake-grid, .catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

 /* Дополнительные стили для табличной формы */
 .registration-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.registration-header {
    text-align: center;
    margin-bottom: 30px;
}

.registration-header h1 {
    color: var(--dark-color);
    font-size: 36px;
    margin-bottom: 10px;
}

fieldset {
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 30px;
    background: white;
    margin-bottom: 20px;
}

legend {
    font-size: 24px;
    color: var(--dark-color);
    font-weight: bold;
    padding: 0 15px;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table td {
    padding: 12px 8px;
    vertical-align: top;
}

.col1 {
    width: 30%;
    text-align: right;
    padding-right: 15px;
}

.col2 {
    width: 40%;
}

.col3 {
    width: 30%;
    padding-left: 15px;
}

.hint {
    font-size: 12px;
    color: var(--text-color);
    font-style: italic;
    line-height: 1.4;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="password"],
.form-table input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-table input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 183, 197, 0.2);
}

.form-table label {
    font-weight: 600;
    color: var(--dark-color);
}

.button-table {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.submit-btn, .reset-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 10px;
    transition: transform 0.2s;
}

.reset-btn {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
}

.submit-btn:hover {
    transform: translateY(-2px);
}

.reset-btn:hover {
    transform: translateY(-2px);
}

/* Стили для формы регистрации */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
header {
    background: linear-gradient(135deg, #ffb7c5, #ffdfd3);
    padding: 15px 0;
    margin-bottom: 30px;
    border-radius: 10px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #5d4037;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
}

/* Заголовки */
h2 {
    color: #5d4037;
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
}

/* Fieldset и форма */
fieldset {
    border: 2px solid #ffb7c5;
    border-radius: 15px;
    padding: 30px;
    background: white;
    margin-bottom: 20px;
}

legend {
    font-size: 24px;
    color: #5d4037;
    font-weight: bold;
    padding: 0 15px;
}

/* Таблица формы */
#form {
    width: 100%;
    border-collapse: collapse;
}

#form td {
    padding: 12px 8px;
    vertical-align: top;
}

.col1 {
    width: 30%;
    text-align: right;
    padding-right: 15px;
    font-weight: bold;
    color: #5d4037;
}

.col2 {
    width: 70%;
}

.hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* Поля ввода */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ffdfd3;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #ffb7c5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 183, 197, 0.2);
}

input:invalid {
    border-color: #ff6b6b;
    background-color: #fff5f5;
}

input:valid {
    border-color: #51cf66;
    background-color: #f8fff9;
}

/* Кнопки */
.button {
    text-align: center;
    padding: 10px;
}

input[type="submit"],
input[type="reset"] {
    background: linear-gradient(135deg, #ffb7c5, #d291bc);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 10px;
    transition: transform 0.2s;
}

input[type="submit"]:hover,
input[type="reset"]:hover {
    transform: translateY(-2px);
}

input[type="reset"] {
    background: linear-gradient(135deg, #cccccc, #999999);
}

/* Таблицы результатов */
.head {
    width: 100%;
    background: linear-gradient(135deg, #fff5f5, #ffecec);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.New {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border-collapse: collapse;
}

.New td {
    padding: 15px 20px;
    border-bottom: 1px solid #ffdfd3;
}

.New tr:last-child td {
    border-bottom: none;
}

.New tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Сообщения об ошибках */
.error {
    color: #d63031;
    background-color: #ffe6e6;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #d63031;
    margin: 20px 0;
}

/* Футер */
footer {
    text-align: center;
    margin-top: 40px;
    color: #666;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Адаптивность */
@media (max-width: 768px) {
    .col1 {
        width: 100%;
        text-align: left;
        padding-right: 0;
        margin-bottom: 5px;
    }
    
    .col2 {
        width: 100%;
    }
    
    #form td {
        display: block;
        width: 100%;
    }
    
    fieldset {
        padding: 15px;
    }
    
    input[type="submit"],
    input[type="reset"] {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

/* Стили для иконок статуса */
.status-valid {
    color: #00b894;
    font-weight: bold;
}

.status-invalid {
    color: #d63031;
    font-weight: bold;
}

/* Дополнительные стили для улучшения UX */
label {
    cursor: pointer;
    display: block;
    margin-bottom: 5px;
}

input:required + label::after {
    content: " *";
    color: #d63031;
}

/* Красивое отображение для таблицы результатов */
table {
    border-collapse: collapse;
    width: 100%;
}

table tr:hover {
    background-color: #f8f9fa;
}

table td:first-child {
    font-weight: bold;
    color: #5d4037;
    width: 30%;
    background-color: #fff5f5;
}
/* Стили для иконок валидации - ИСПРАВЛЕННЫЕ */
.fa-check, .fa-times {
    margin-left: 10px;
    font-size: 16px;
    display: none !important;
}

.fa-times {
    color: red;
}

.fa-check {
    color: green;
}

/* Показываем ТОЛЬКО галочку при валидном поле */
#first_name:valid ~ #valid_first_name,
#last_name:valid ~ #valid_last_name,
#email:valid ~ #valid_email,
#phone:valid ~ #valid_phone,
#username:valid ~ #valid_username,
#password:valid ~ #valid_password,
#confirm_password:valid ~ #valid_confirm_password {
    display: inline-block !important;
}

/* Показываем ТОЛЬКО крестик при невалидном поле (после ввода данных) */
#first_name:invalid:not(:placeholder-shown) ~ #invalid_first_name,
#last_name:invalid:not(:placeholder-shown) ~ #invalid_last_name,
#email:invalid:not(:placeholder-shown) ~ #invalid_email,
#phone:invalid:not(:placeholder-shown) ~ #invalid_phone,
#username:invalid:not(:placeholder-shown) ~ #invalid_username,
#password:invalid:not(:placeholder-shown) ~ #invalid_password,
#confirm_password:invalid:not(:placeholder-shown) ~ #invalid_confirm_password {
    display: inline-block !important;
}

/* Скрываем крестик когда поле валидно */
#first_name:valid ~ #invalid_first_name,
#last_name:valid ~ #invalid_last_name,
#email:valid ~ #invalid_email,
#phone:valid ~ #invalid_phone,
#username:valid ~ #invalid_username,
#password:valid ~ #invalid_password,
#confirm_password:valid ~ #invalid_confirm_password {
    display: none !important;
}

/* Скрываем галочку когда поле невалидно */
#first_name:invalid ~ #valid_first_name,
#last_name:invalid ~ #valid_last_name,
#email:invalid ~ #valid_email,
#phone:invalid ~ #valid_phone,
#username:invalid ~ #valid_username,
#password:invalid ~ #valid_password,
#confirm_password:invalid ~ #valid_confirm_password {
    display: none !important;
}

/* Стили для полей ввода в форме регистрации */
main input[type="text"],
main input[type="email"],
main input[type="password"],
main input[type="tel"] {
    width: 80%;
    padding: 8px 12px;
    border: 1px solid #ffdfd3;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

main input:focus {
    border-color: #ffb7c5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 183, 197, 0.2);
}

main input:invalid:not(:placeholder-shown) {
    border-color: #ff6b6b;
    background-color: #fff5f5;
}

main input:valid {
    border-color: #51cf66;
    background-color: #f8fff9;
}

/* Плейсхолдеры */
main ::placeholder {
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Стили для формы регистрации */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

main fieldset {
    border: 2px solid #ffb7c5;
    border-radius: 15px;
    padding: 30px;
    background: white;
    margin-bottom: 20px;
}

main legend {
    font-size: 24px;
    color: #5d4037;
    font-weight: bold;
    padding: 0 15px;
}

main .hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    margin-top: 5px;
}

main .button {
    background: linear-gradient(135deg, #ffb7c5, #d291bc);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 10px;
    transition: transform 0.2s;
}

main .button:hover {
    transform: translateY(-2px);
}