/* Variables */
:root {
    --primary-color: #9147ff;
    --secondary-color: #772ce8;
    --success-color: #00994d;
    --danger-color: #ff0000;
    --ocean-color: #4682B4;
    --sky-color: #87CEEB;
    --gold-color: #FFD700;
    --emerald-color: #008055;
    --gray-color: #808080;
    --background: #0e0e10;
    --card-bg: #1f1f23;
    --text: #efeff1;
    --text-muted: #d1d1d3;
    --border: #2d2d2f;
    --link-color: #a970ff;
    --footer-link-color: #c8b3ff;
    --heart-color: #ff69b4;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.section {
    margin-bottom: 4rem;
}

/* Header */
.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.main-header.scroll-down {
    transform: translateY(-100%);
}

.main-header.scroll-up {
    transform: translateY(0);
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-image {
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 4px;
}

.nav-link:hover {
    color: var(--link-color);
}

/* Mobile Menu */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14, 14, 16, 0.95);
    z-index: 99;
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    height: 100%;
}

.mobile-nav .nav-link {
    font-size: 1.25rem;
}

/* Section Headers */
.section-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.section-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.post-card {
    overflow: hidden;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Post Styles */
.post-header {
    margin-bottom: 1.5rem;
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-content {
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.post-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Like System */
.like-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.like-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.like-button:not(.has-likes)::before {
    content: '🖤';
}

.like-button.has-likes::before {
    content: '💗';
}

.like-button.liked::before {
    content: '💗';
    filter: drop-shadow(0 0 5px var(--heart-color));
}

.like-count {
    font-size: 1rem;
    color: var(--text-muted);
    min-width: 2rem;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 8px var(--heart-color)); }
    100% { transform: scale(1); }
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); filter: drop-shadow(0 0 10px var(--heart-color)); }
    100% { transform: scale(1); }
}

.like-button.animating::before {
    animation: likeAnimation 0.3s ease forwards;
}

.like-button.liked.has-likes::before {
    animation: heartbeat 1.5s infinite;
}

/* Footer */
.main-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-text {
    text-align: center;
    color: var(--text);
}

.footer-link {
    color: var(--footer-link-color);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading State */
.loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .logo-link {
        font-size: 1.25rem;
    }

    .logo-image {
        width: 48px;
        height: 48px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 1rem;
        margin: 1rem 0;
    }

    .post-content {
        font-size: 0.95rem;
    }
}

@media (min-width: 769px) {
    .mobile-menu-button,
    .mobile-menu {
        display: none;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .like-button,
    .mobile-menu-button {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .container {
        max-width: none;
        padding: 0;
    }
}