/* ===========================================
   WISHLIST PLATFORM - Основные стили
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --primary: #ff6b6b;
    --primary-light: #ff8e8e;
    --primary-dark: #e85555;
    --secondary: #4ecdc4;
    --accent: #ffe66d;
    
    --bg-main: #fafafa;
    --bg-card: #ffffff;
    --bg-dark: #2d3436;
    
    --text-main: #2d3436;
    --text-secondary: #636e72;
    --text-light: #b2bec3;
    
    --border: #e9ecef;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    
    --nav-height: 70px;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

/* Навигация */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-main);
}

.logo-icon { font-size: 1.5rem; }

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-link:hover { color: var(--primary); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
}

.nav-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 20px;
}

.nav-mobile-menu a {
    display: block;
    padding: 12px 0;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
}

.nav-mobile-menu hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 10px 0;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4);
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
}

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

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

.btn-ghost:hover {
    background: var(--bg-main);
    color: var(--text-main);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block { width: 100%; }

.btn-danger { color: #e74c3c; }
.btn-danger:hover { background: rgba(231, 76, 60, 0.1); }

/* Основной контент */
.main-content {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height) - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Алерты */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin: 20px auto;
    max-width: 600px;
}

.alert-error {
    background: #ffeaea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #e8f5e9;
    color: #27ae60;
    border: 1px solid #c3e6cb;
}

/* Hero секция */
.hero {
    position: relative;
    padding: 80px 20px 100px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff5f5 0%, #f0f9ff 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,107,107,0.2) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.hero-shape-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(78,205,196,0.2) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation-delay: -4s;
}

.hero-shape-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,230,109,0.3) 0%, transparent 70%);
    top: 50%;
    left: 30%;
    animation-delay: -2s;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-features {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feature-icon { font-size: 1.2rem; }

/* Preview mockup */
.hero-preview {
    position: relative;
    z-index: 1;
    max-width: 400px;
    margin: 50px auto 0;
}

.preview-mockup {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.mockup-header {
    background: #f5f5f5;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
}

.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #febc2e; }
.mockup-dot:nth-child(3) { background: #28c840; }

.mockup-url {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.mockup-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mockup-card {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mockup-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
}

.mockup-text {
    flex: 1;
}

.mockup-line {
    height: 10px;
    border-radius: 5px;
    background: #eee;
    margin-bottom: 8px;
}

.mockup-line.w-80 { width: 80%; }
.mockup-line.w-70 { width: 70%; }
.mockup-line.w-60 { width: 60%; }
.mockup-line.w-50 { width: 50%; }

.mockup-btn {
    width: 80px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.mockup-btn.reserved {
    background: #e0e0e0;
}

/* Секции */
.section {
    padding: 80px 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.section-action {
    text-align: center;
    margin-top: 40px;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Themes grid */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.theme-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.theme-preview {
    height: 160px;
    background: var(--theme-bg);
    padding: 20px;
    position: relative;
}

.theme-preview-header {
    margin-bottom: 15px;
}

.theme-preview-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--theme-accent);
}

.theme-preview-cards {
    display: flex;
    gap: 10px;
}

.theme-preview-card {
    flex: 1;
    height: 60px;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
}

.theme-info {
    padding: 20px;
}

.theme-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.theme-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-card .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8e8e 100%);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 10px;
}

.cta p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
}

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

.cta .btn:hover {
    transform: translateY(-2px);
}

/* Footer */
.main-footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 20px 20px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-icon {
    font-size: 2rem;
    margin-right: 10px;
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    margin-top: 10px;
    font-size: 0.9rem;
}

.footer-col h4 {
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 6px 0;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* Auth pages */
.page-auth .main-nav,
.page-auth .main-footer {
    display: none;
}

.page-auth .main-content {
    margin-top: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 450px;
    position: relative;
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    font-size: 3rem;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-secondary);
}

.username-preview {
    background: var(--bg-main);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-top: 15px;
    font-family: monospace;
    font-size: 0.95rem;
}

.username-preview #usernamePreview {
    color: var(--primary);
    font-weight: 700;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.auth-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
}

.auth-shape:first-child {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -150px;
    right: -100px;
}

.auth-shape:last-child {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    bottom: -100px;
    left: -50px;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-hint {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-light);
}

.form-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Dashboard */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.dashboard-welcome h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.dashboard-welcome p {
    color: var(--text-secondary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h2 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Wishlists grid */
.wishlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.wishlist-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.wishlist-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.wishlist-card-header {
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-size: cover;
    background-position: center;
    position: relative;
}

.wishlist-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-inactive {
    background: rgba(0,0,0,0.5);
    color: white;
}

.wishlist-card-body {
    padding: 20px;
}

.wishlist-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.wishlist-date,
.wishlist-url {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.wishlist-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 10px;
}

.wishlist-card-actions {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.wishlist-card-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.85rem;
}

.wishlist-card-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    border: 2px dashed var(--border);
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.wishlist-card-add:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: none;
}

.add-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Editor */
.editor {
    display: grid;
    grid-template-columns: 350px 1fr;
    min-height: calc(100vh - var(--nav-height));
}

.editor-sidebar {
    background: white;
    border-right: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - var(--nav-height));
    position: sticky;
    top: var(--nav-height);
}

.sidebar-header {
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin-top: 10px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.form-section h3 {
    font-size: 1rem;
    margin-bottom: 15px;
}

.themes-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.theme-option {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
}

.theme-option:hover {
    border-color: var(--primary);
}

.theme-option.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.05);
}

.theme-option input {
    position: absolute;
    opacity: 0;
}

.theme-preview-mini {
    height: 50px;
    background: var(--t-bg);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
}

.t-circle {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--t-accent);
    margin-bottom: 6px;
}

.t-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.t-line {
    height: 4px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
    width: 80%;
}

.t-line.short { width: 50%; }

.theme-option span {
    font-size: 0.75rem;
    font-weight: 600;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
}

.toggle-row span {
    font-size: 0.9rem;
}

.toggle-row input[type="checkbox"] {
    width: 44px;
    height: 24px;
    appearance: none;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-row input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-row input[type="checkbox"]:checked {
    background: var(--primary);
}

.toggle-row input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.copy-field {
    display: flex;
    gap: 8px;
}

.copy-field input {
    flex: 1;
    font-size: 0.85rem;
    background: var(--bg-main);
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Editor main */
.editor-main {
    padding: 30px;
    background: var(--bg-main);
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.editor-toolbar h2 {
    font-size: 1.3rem;
}

.editor-placeholder {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--radius);
    border: 2px dashed var(--border);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.editor-placeholder h3 {
    margin-bottom: 10px;
}

.editor-placeholder p {
    color: var(--text-secondary);
}

/* Gifts list in editor */
.gifts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gift-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.gift-item.hidden-gift {
    opacity: 0.5;
}

.gift-drag-handle {
    color: var(--text-light);
    cursor: grab;
    font-size: 1.2rem;
}

.gift-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.gift-thumb-empty {
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.gift-info {
    flex: 1;
}

.gift-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.gift-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.gift-reserved {
    font-size: 0.8rem;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(78, 205, 196, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

.gift-actions {
    display: flex;
    gap: 5px;
}

.gift-actions .btn {
    padding: 8px 12px;
    font-size: 1rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-lg {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.link-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.link-row input:first-child {
    width: 120px;
    flex-shrink: 0;
}

.link-row input:nth-child(2) {
    flex: 1;
}

/* Section hints */
.section-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.form-section-divider {
    margin: 25px 0 15px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}

.form-section-divider h4 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 15px;
    transition: all 0.2s;
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.upload-placeholder:hover {
    color: var(--primary);
}

.upload-icon {
    font-size: 2rem;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.upload-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-main);
}

.upload-thumb.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1s infinite;
}

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

.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-thumb {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-thumb:hover {
    background: #e74c3c;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Info pages (FAQ, Contacts) */
.info-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.info-page h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.faq-question:hover {
    background: var(--bg-main);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Contacts */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-card h3 {
    margin-bottom: 10px;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-form {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.contact-form h2 {
    margin-bottom: 25px;
}

/* Toast */
.toast {
    position: fixed;
    top: 90px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--secondary);
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .editor {
        grid-template-columns: 1fr;
    }
    
    .editor-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-actions {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: flex;
    }
    
    .nav-mobile-menu.active {
        display: block;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

.nav-mobile-menu.active {
    display: block;
}

/* ===========================================
   УЛУЧШЕННАЯ МОБИЛЬНАЯ АДАПТИВНОСТЬ
   =========================================== */

/* Кнопка мобильных настроек (скрыта на десктопе) */
.mobile-settings-btn {
    display: none;
}

.mobile-sidebar-overlay {
    display: none;
}

.sidebar-close-btn {
    display: none;
}

/* Редактор на мобильных */
@media (max-width: 900px) {
    .editor {
        display: flex;
        flex-direction: column;
    }
    
    .editor-main {
        order: 1;
        padding: 15px;
        min-height: calc(100vh - var(--nav-height) - 80px);
    }
    
    .editor-toolbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* Sidebar как выезжающая панель */
    .editor-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        overflow-y: auto;
        border-right: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    
    .editor-sidebar.mobile-open {
        left: 0;
    }
    
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: var(--bg-main);
        border: none;
        border-radius: 50%;
        font-size: 1.2rem;
        cursor: pointer;
        color: var(--text-secondary);
    }
    
    .sidebar-close-btn:hover {
        background: var(--primary);
        color: white;
    }
    
    /* Оверлей */
    .mobile-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    .mobile-sidebar-overlay.active {
        display: block;
    }
    
    /* Кнопка открытия настроек */
    .mobile-settings-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 50%;
        font-size: 1.5rem;
        box-shadow: var(--shadow-lg);
        z-index: 100;
        cursor: pointer;
        transition: transform 0.2s, background 0.2s;
    }
    
    .mobile-settings-btn:hover {
        transform: scale(1.1);
    }
    
    .mobile-settings-btn.active {
        background: var(--text-main);
    }
    
    /* Gifts list на мобильных */
    .gift-item {
        flex-wrap: wrap;
    }
    
    .gift-drag-handle {
        display: none;
    }
    
    .gift-thumb {
        width: 50px;
        height: 50px;
    }
    
    .gift-info {
        flex: 1;
        min-width: 150px;
    }
    
    .gift-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 600px) {
    /* Модальные окна на мобильных */
    .modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
        border-radius: var(--radius-sm);
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Форма товара */
    .link-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .link-row input:first-child {
        width: 100%;
    }
    
    /* Dashboard */
    .subdomain-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .subdomain-main {
        flex-direction: column;
    }
    
    .wishlists-grid {
        grid-template-columns: 1fr;
    }
    
    .wishlist-card-actions {
        flex-direction: column;
    }
    
    /* Themes selector */
    .themes-selector {
        grid-template-columns: 1fr;
    }
    
    /* Toggle rows */
    .toggle-row span {
        font-size: 0.85rem;
    }
}

/* ===========================================
   УЛУЧШЕННАЯ ФОРМА ДОБАВЛЕНИЯ ТОВАРОВ
   =========================================== */

/* Блок варианта товара (ссылка + картинка) */
.product-variant {
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.product-variant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.product-variant-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.product-variant-remove {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

.product-variant-remove:hover {
    color: #e74c3c;
}

.product-variant-fields {
    display: grid;
    gap: 12px;
}

.product-variant-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .product-variant-row {
        grid-template-columns: 1fr;
    }
}

.add-variant-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-variant-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Превью картинки в форме */
.image-preview-inline {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border);
}

.image-preview-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
    border: 2px dashed var(--border);
}

/* Улучшенные поля ввода */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0.5;
}

/* Компактная форма для мобильных */
@media (max-width: 600px) {
    .product-variant {
        padding: 12px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px;
        font-size: 16px; /* Предотвращает zoom на iOS */
    }
}

/* Статус username */
.username-status {
    font-size: 0.85rem;
    margin-top: 8px;
}
.username-status.checking { color: var(--text-secondary); }
.username-status.available { color: #27ae60; }
.username-status.taken { color: #e74c3c; }

/* Выбор смайликов */
.emoji-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.emoji-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.emoji-option:hover {
    border-color: var(--primary-light);
}

.emoji-option.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.05);
}

.emoji-option input {
    display: none;
}

.emoji-preview {
    font-size: 1.2rem;
}

.emoji-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Поле поддомена */
.subdomain-input {
    display: flex;
    align-items: center;
}

.subdomain-input input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.subdomain-suffix {
    background: var(--bg-main);
    border: 2px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.subdomain-preview {
    margin-top: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.subdomain-preview strong {
    color: var(--primary);
    word-break: break-all;
}

/* Группы товаров */
.gift-group {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    overflow: hidden;
    border-left: 4px solid var(--secondary);
}

.gift-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(78, 205, 196, 0.05));
    border-bottom: 1px solid var(--border);
}

.group-icon {
    font-size: 1.2rem;
}

.group-name {
    font-weight: 700;
    color: var(--text-main);
}

.group-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    flex: 1;
}

.gift-group-items {
    padding: 10px;
}

.gift-group-items .gift-item {
    margin-bottom: 8px;
    box-shadow: none;
    border: 1px solid var(--border);
}

.gift-group-items .gift-item:last-child {
    margin-bottom: 0;
}

.gift-in-group {
    background: var(--bg-main);
}

/* Чекбокс выбора */
.gift-select {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* Панель группировки */
.group-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.group-toolbar .btn-primary {
    background: var(--secondary);
}

@media (max-width: 600px) {
    .group-toolbar {
        left: 10px;
        right: 10px;
        transform: none;
        bottom: 90px;
    }
    
    .gift-group-header {
        flex-wrap: wrap;
    }
    
    .group-hint {
        width: 100%;
        margin-top: 5px;
    }
}

@media (max-width: 600px) {
    .emoji-selector {
        grid-template-columns: 1fr;
    }
}

/* Баннеры уведомлений */
.warning-banner {
    background: linear-gradient(135deg, #fff3e0, #fff8e1);
    border-radius: var(--radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #e65100;
    font-size: 0.9rem;
    border-left: 4px solid #ff9800;
}

.wishlist-url-warning {
    color: #e65100 !important;
    font-weight: 400;
}

/* Подсказка про группы */
.groups-hint {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(78, 205, 196, 0.05));
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: var(--radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.groups-hint strong {
    color: var(--secondary);
}

/* Селектор описания для денег */
.money-description-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.money-desc-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-main);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.money-desc-option:hover {
    border-color: var(--primary-light);
}

.money-desc-option.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.05);
}

.money-desc-option input[type="radio"] {
    display: none;
}

.money-desc-option span {
    flex: 1;
}

.money-desc-custom {
    background: transparent;
    border-style: dashed;
}
