/* ============================================
   NEW-STYLE.CSS - Общие стили проекта MenuBo
   ============================================ */

/* Подключение кастомного шрифта */
@font-face {
    font-family: "Shrift";
    src: url("/static/fonts/shrift.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

/* ============================================
   CSS Reset & Base Variables
   ============================================ */

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

:root {
    /* Основные цвета */
    --bg: #0b0c0e;
    --text-primary: #fff;
    --text-secondary: #a1a1aa;
    --accent: #10b981;
    --accent-hover: #059669;
    --border: rgba(255, 255, 255, 0.12); /* Сделать границу немного ярче */

    /* Glassmorphism эффекты */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(24px);
    --glass-shadow-inset: rgba(255, 255, 255, 0.1);
    --glass-shadow-out: rgba(0, 0, 0, 0.4);
}

/* ============================================
   Body & Layout
   ============================================ */

body {
    font-family: "Shrift", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Subtle grid background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at top, black 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(42px, 6vw, 76px);
    letter-spacing: -2px;
}

h2 {
    font-size: clamp(32px, 4vw, 56px);
}

h3 {
    font-size: 22px;
}

p {
    font-size: 16px;
    line-height: 1.6;
}

/* ============================================
   Buttons - Общие стили кнопок
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.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 {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Варианты кнопок */
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.05);
}

/* ============================================
   Form Elements - Общие стили форм
   ============================================ */

.form-group {
    margin-bottom: 24px;
}

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

input.error {
    border-color: var(--error);
    background: rgba(255, 107, 107, 0.05);
}

/* ============================================
   Glass Card - Переиспользуемый компонент
   ============================================ */

.glass-card {
    position: relative;
    padding: 36px;
    border-radius: 24px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow:
        inset 0 4px 12px var(--glass-shadow-inset),
        0 8px 28px var(--glass-shadow-out);
    transition: transform 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent);
    mix-blend-mode: overlay;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
}

/* ============================================
   Utilities
   ============================================ */

/* Hidden elements with animation */
.hidden-section {
    visibility: hidden;
    opacity: 0;
    transform: translateY(40px);
    transition: visibility 0s linear 0.4s, opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hidden-section.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

/* Text alignment */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Spacing */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 48px; }

/* Display */
.flex {
    display: flex;
}

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

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

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

/* ============================================
   Animations
   ============================================ */

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

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

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

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    .btn {
        padding: 14px 28px;
        font-size: 15px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .glass-card {
        padding: 24px 20px;
    }
}

/* ============================================
   Body & Layout - ДОПОЛНЕНИЕ
   ============================================ */

html {
    height: 100%;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Shrift", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container.main-content {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

.main-content {
    flex: 1 0 auto;
    padding-bottom: 60px; /* Отступ от футера */
}

.footer {
    flex-shrink: 0;
}

.modal-content .btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.modal-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.modal-content .btn-primary:active {
    transform: translateY(0);
}

/* Стиль для кнопки создания презентации в модалке */
.modal-content button[type="submit"] {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.modal-content button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.modal-content button[type="submit"]:active {
    transform: translateY(0);
}