﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: #ededed;
    padding-top: 100px;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border-bottom: 1px solid #222;
    padding: 0.75rem 1rem;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(10, 10, 10, 0.9);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.site-header h1 {
    font-size: 1.2rem;
    font-weight: 500;
    background: none;
    background-clip: unset;
    -webkit-background-clip: unset;
    color: #ededed;
}

.site-header .tagline {
    font-size: 0.6rem;
    color: #666;
}

.lang-switch {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #111;
    padding: 0.2rem 0.6rem;
    border-radius: 1.5rem;
    border: 1px solid #222;
    font-size: 0.7rem;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.7rem;
    font-family: inherit;
    padding: 0.1rem 0.3rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: #fff;
    background: #1a1a1a;
}

.lang-btn.active {
    color: #fff;
    background: #2a2a2a;
}

.lang-divider {
    color: #444;
    font-size: 0.7rem;
}

.form-card {
    background: #111;
    border-radius: 1.5rem;
    padding: 1.75rem;
    margin-bottom: 2.5rem;
    border: 1px solid #222;
    margin-top: 1.5rem;
}

textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #2a2a2a;
    border-radius: 1.25rem;
    background: #0a0a0a;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #ededed;
}

textarea:focus {
    outline: none;
    border-color: #555;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

textarea::placeholder {
    color: #555;
}

.submit-btn {
    background: #ededed;
    color: #0a0a0a;
    border: none;
    padding: 0.75rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 2rem;
    cursor: pointer;
    margin-top: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.submit-btn:hover {
    background: #fff;
    transform: scale(0.98);
}

.sort-bar {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.sort-link {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    transition: all 0.2s;
}

.sort-link:hover {
    color: #fff;
    background: #1a1a1a;
}

.sort-link.active {
    color: #fff;
    background: #2a2a2a;
}

.stats-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stats-icon {
    font-size: 1.25rem;
}

.stats-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.stats-title {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-numbers {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.stats-numbers span {
    background: #1a1a1a;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
}

.stats-top {
    font-size: 0.75rem;
    color: #aaa;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.stats-top-text {
    display: inline;
    word-break: break-word;
    overflow-wrap: break-word;
    cursor: help;
    border-bottom: 1px dotted #444;
}

.stats-top-count {
    color: #ffaa33;
}

.feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.fear-item {
    background: #111;
    border: 1px solid #222;
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fear-item:hover {
    border-color: #333;
    background: #151515;
}

.fear-text {
    font-size: 0.9rem;
    color: #ededed;
    word-break: break-word;
    line-height: 1.5;
    flex: 1;
}

.count {
    font-weight: 600;
    background: #1a1a1a;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    margin-left: 0.25rem;
    color: #ccc;
}

.fear-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.copy-btn, .share-btn, .same-btn {
    background: transparent;
    border: 1px solid #2a2a2a;
    padding: 0.4rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    color: #ccc;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.same-btn {
    padding: 0.4rem 1rem;
    gap: 0.4rem;
}

.copy-btn:hover, .share-btn:hover, .same-btn:hover {
    background: #1a1a1a;
    border-color: #444;
    transform: scale(0.97);
    color: #fff;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
    background: #111;
    border-radius: 1.5rem;
    border: 1px solid #222;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    background: #222;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover {
    background: #333;
    transform: scale(1.02);
}

.page-link.active {
    background: #444;
    outline: 1px solid #666;
}

.footer-note {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #1a1a1a;
}

.footer-copyright {
    font-size: 0.7rem;
    color: #555;
}

.footer-links {
    margin: 0.15rem 0;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: #777;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #1a1a1a;
    border-left: 3px solid;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    animation: slideIn 0.25s ease;
    max-width: 280px;
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
}

.toast-success {
    border-left-color: #33aa33;
    background: #1a2a1a;
    color: #88ff88;
}

.toast-error {
    border-left-color: #aa3333;
    background: #2a1a1a;
    color: #ff8888;
}

.toast-warning {
    border-left-color: #ffaa33;
    background: #2a2a1a;
    color: #ffcc88;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.share-template {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 600px;
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
    color: #ededed;
    padding: 2rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    border-radius: 1.5rem;
    border: 1px solid #2a2a2a;
    margin: 0;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.share-template h3 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    color: transparent;
    margin-bottom: 1rem;
    margin-top: 0;
}

.share-template .tagline {
    font-size: 0.8rem;
    color: #ffaa33;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.share-template .fear-text {
    font-size: 1.2rem;
    color: #ededed;
    margin: 1.5rem 0 1.5rem 0;
    line-height: 1.5;
    border-left: 3px solid #ffaa33;
    padding-left: 1rem;
}

.share-template .stats {
    font-size: 0.9rem;
    color: #aaaaaa;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-template .url {
    font-size: 0.8rem;
    color: #555555;
    margin-top: 1rem;
    border-top: 1px solid #222;
    padding-top: 1rem;
}

@media (max-width: 800px) {
    .feed {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    body {
        padding-top: 70px;
    }

    .site-header {
        padding: 0.5rem 1rem;
    }

    .site-header h1 {
        font-size: 1rem;
    }

    .site-header .tagline {
        font-size: 0.6rem;
    }

    #addFearForm {
        display: flex;
        flex-direction: column;
    }

    .submit-btn {
        width: auto;
        align-self: center;
        padding: 0.75rem 2.5rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .stats-card {
        flex-direction: column;
        align-items: center; 
        text-align: center;
        padding: 1rem;
    }

    .stats-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        width: 100%;
    }

    .stats-title {
        text-align: center;
        width: 100%;
    }

    .stats-numbers {
        justify-content: center;
        width: 100%;
    }

    .stats-top {
        text-align: center;
        width: 100%;
        flex: none;
    }

    .stats-top-text {
        display: inline-block;
        max-width: 100%; 
        text-align: center;
    }

    .feed {
        grid-template-columns: 1fr;
    }

    .fear-item {
        background: linear-gradient(135deg, #111 0%, #0d0d0d 100%);
        border: 1px solid #2a2a2a;
        transition: all 0.2s ease;
    }

    .fear-item:hover {
        transform: translateY(-2px);
        border-color: #ffaa33;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .fear-text {
        font-size: 0.9rem;
        font-weight: 400;
        line-height: 1.5;
    }

    .same-btn {
        align-self: center;
    }

    .sort-bar {
        justify-content: center;
    }

    .toast-container {
        top: 80px;
    }
}