@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #00d2ff;
    --primary-gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    --pvz-green: #38ef7d;
    --pvz-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --bg-color: #0b0f19;
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

h1, h2, h3, .logo {
    font-family: 'Lilita One', cursive;
    letter-spacing: 1px;
    font-weight: normal;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(17, 153, 142, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: slowSpin 30s linear infinite;
}

@keyframes slowSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Glassmorphism Header */
.site-header {
    background: rgba(11, 15, 25, 0.4);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--pvz-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--pvz-gradient);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--pvz-green);
}

.main-nav a:hover::after {
    width: 100%;
}

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

.user-menu a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.user-menu a:hover {
    color: var(--pvz-green);
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-primary {
    background: var(--pvz-gradient);
    color: #000;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 239, 125, 0.4);
}

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

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

/* Hero Landing Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    background: var(--pvz-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Feed */
.feed-section {
    padding: 60px 0;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* Glass Cards */
.post-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-10px);
    border-color: rgba(56, 239, 125, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 239, 125, 0.1);
}

.post-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(56, 239, 125, 0.1);
    color: var(--pvz-green);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    align-self: flex-start;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--surface-border);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface-border);
}

.author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    background: var(--surface-color);
    border-radius: 24px;
    border: 1px dashed var(--surface-border);
}

.empty-state h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: var(--pvz-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--surface-border);
    color: var(--text-muted);
    margin-top: 80px;
}

/* Animations */
.nav-link {
    animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.nav-link:nth-child(1) { animation-delay: 0.1s; }
.nav-link:nth-child(2) { animation-delay: 0.2s; }
.nav-link:nth-child(3) { animation-delay: 0.3s; }

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

/* Auth & Forms */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.glass-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.glass-card h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 30px;
    background: var(--pvz-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--pvz-green);
    box-shadow: 0 0 0 3px rgba(56, 239, 125, 0.1);
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

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

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Responsive Design (Мобильная адаптация) */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .user-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr; /* 1 колонка на телефонах */
    }
    
    .post-card {
        padding: 20px;
    }
    
    .glass-card {
        padding: 20px;
    }
}
