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

:root {
    --bg-primary: #e8e4d9;
    --bg-secondary: #fff;
    --bg-card: #fff;
    --border-color: #000;
    --text-primary: #000;
    --text-secondary: #333;
    --text-muted: #666;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --pink: #ff6b9d;
    --yellow: #ffd93d;
    --cyan: #00d4ff;
    --lime: #c4ff61;
    --shadow: 4px 4px 0px #000;
    --shadow-hover: 6px 6px 0px #000;
    --code-bg: #1a1a1a;
    --code-text: #f8f8f2;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 107, 157, 0.15) 0%, transparent 55%),
        radial-gradient(circle at 75% 75%, rgba(0, 212, 255, 0.15) 0%, transparent 55%),
        radial-gradient(circle at 50% 10%, rgba(196, 255, 97, 0.1) 0%, transparent 55%),
        radial-gradient(circle at 10% 50%, rgba(255, 217, 61, 0.1) 0%, transparent 55%);
    z-index: -1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 20px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: var(--lime);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 4px 4px 0px #000; }
    50% { box-shadow: 4px 4px 0px #000, 0 0 15px rgba(196, 255, 97, 0.5); }
    100% { box-shadow: 4px 4px 0px #000; }
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.nav-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: 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    transform: translate(-4px, -4px) scale(1.05);
    box-shadow: var(--shadow-hover);
    background: var(--yellow);
}

.nav-btn.active {
    background: var(--accent);
    color: white;
    animation: activePulse 1.5s infinite;
}

@keyframes activePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

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

.posts-timeline {
    max-width: 700px;
    margin: 0 auto;
}

.post-card {
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    animation: slideUp 0.5s ease-out;
}

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

.post-card:hover {
    transform: translateY(-8px) rotate(0.5deg);
    box-shadow: 8px 8px 0px #000, 0 10px 30px rgba(0,0,0,0.1);
}

.post-header {
    padding: 20px;
    border-bottom: 3px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--yellow);
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.author-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.author-info .post-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.post-language {
    padding: 6px 15px;
    background: var(--cyan);
    border: 2px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    animation: slideInRight 0.5s ease-out;
}

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

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
    animation: textPop 0.5s ease-out;
}

@keyframes textPop {
    0% { letter-spacing: -1px; }
    50% { letter-spacing: 1px; }
    100% { letter-spacing: normal; }
}

.post-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.post-tag {
    padding: 4px 10px;
    background: var(--lime);
    border: 2px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
}

.post-tag:hover {
    transform: rotate(5deg) scale(1.1);
    background: var(--pink);
}

.code-preview {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 15px;
    border: 2px solid var(--border-color);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    max-height: 200px;
    overflow-y: hidden;
    margin-bottom: 15px;
    position: relative;
}

.code-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, rgba(26, 26, 26, 0.8));
    pointer-events: none;
}

.post-footer {
    padding: 15px 20px;
    border-top: 3px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
}

.post-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item i {
    color: var(--accent);
    transition: transform 0.3s;
}

.stat-item:hover i {
    transform: scale(1.2);
}

.post-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    border: 3px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translate(-3px, -3px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

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

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

.btn-success:hover {
    background-color: #16a34a;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-like {
    background-color: var(--pink);
    color: white;
    animation: pulseHeart 2s infinite;
}

.btn-like.liked {
    background-color: var(--success);
    animation: none;
}

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

.admin-access {
    margin: 30px auto;
    max-width: 500px;
}

.admin-key-input {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    border: 3px solid var(--border-color);
    background: var(--bg-card);
    text-align: center;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.admin-key-input:focus {
    outline: none;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
    background: var(--lime);
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

.card {
    background-color: var(--bg-card);
    border: 3px solid var(--border-color);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 6px 6px 0px #000;
}

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

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    animation: slideInLeft 0.5s ease-out;
}

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

.form-control {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    border: 3px solid var(--border-color);
    background: var(--bg-card);
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
    background: var(--lime);
    animation: inputFocus 0.5s ease-out;
}

@keyframes inputFocus {
    0% { transform: translate(-2px, -2px) scale(1); }
    50% { transform: translate(-2px, -2px) scale(1.02); }
    100% { transform: translate(-2px, -2px) scale(1); }
}

.code-editor {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: var(--code-bg);
    color: var(--code-text);
    border: 3px solid var(--border-color);
    resize: vertical;
    transition: all 0.3s;
}

.code-editor:focus {
    outline: none;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    animation: modalFadeIn 0.3s ease-out;
}

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

.project-modal.active {
    display: block;
}

.modal-content {
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    box-shadow: 8px 8px 0px #000;
    position: relative;
    animation: modalSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--error);
    color: white;
    border: 3px solid var(--border-color);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s;
    animation: rotateIn 0.5s ease-out;
}

@keyframes rotateIn {
    from { transform: rotate(-180deg) scale(0); }
    to { transform: rotate(0) scale(1); }
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: #dc2626;
}

.modal-header {
    margin-bottom: 25px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    animation: textGlow 2s infinite alternate;
}

@keyframes textGlow {
    from { text-shadow: 0 0 5px rgba(79, 70, 229, 0.5); }
    to { text-shadow: 0 0 20px rgba(79, 70, 229, 0.8); }
}

.modal-code {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 20px;
    border: 3px solid var(--border-color);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
    margin: 25px 0;
    white-space: pre-wrap;
    word-break: break-all;
    animation: codeFadeIn 0.5s ease-out;
}

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

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.comments-section {
    margin-top: 30px;
    border-top: 3px solid var(--border-color);
    padding-top: 20px;
}

.comments-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.comment-item {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    padding: 15px;
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
}

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

.comment-author {
    font-weight: 700;
    color: var(--accent);
}

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

.comment-text {
    line-height: 1.5;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.comment-input {
    flex: 1;
    padding: 12px;
    border: 3px solid var(--border-color);
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s;
}

.comment-input:focus {
    outline: none;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
    background: var(--lime);
}

.alert {
    padding: 12px 16px;
    border: 3px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: none;
    box-shadow: var(--shadow);
    animation: shake 0.5s ease-out;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: var(--bg-card);
}

@keyframes shake {
    0%, 100% { transform: translateX(-50%); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(calc(-50% - 5px)); }
    20%, 40%, 60%, 80% { transform: translateX(calc(-50% + 5px)); }
}

.alert.show {
    display: block;
    animation: slideInDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInDown {
    from { opacity: 0; transform: translate(-50%, 30px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.alert-success {
    background-color: var(--lime);
    color: #000;
}

.alert-error {
    background-color: var(--pink);
    color: #000;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    animation: fadeIn 1s ease-out;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--cyan);
    animation: float 3s ease-in-out infinite;
}

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

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 3px solid var(--border-color);
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.85rem;
    position: relative;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.like-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--pink);
    color: white;
    padding: 12px 20px;
    border: 3px solid var(--border-color);
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: var(--shadow);
    z-index: 100;
    display: none;
    animation: slideInRight 0.5s ease-out;
}

.like-notification.show {
    display: block;
    animation: slideInRight 0.5s ease-out;
}

.like-notification.unlike {
    background: var(--cyan);
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .post-actions {
        width: 100%;
    }
    
    .post-actions .btn {
        flex: 1;
    }
    
    .comment-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .modal-title {
        font-size: 1.4rem;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}