:root {
    --bg-color: #1a120b;
    --card-bg: #2b2118;
    --text-primary: #fffbeb;
    --text-secondary: #d1d5db;
    --accent: #fbbf24;
    --accent-hover: #f59e0b;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a120b 0%, #451a03 100%);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fbbf24, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.search-bar {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

input {
    width: 100%;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    border: 2px solid #334155;
    background-color: #1e293b;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

.card img {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.card h2 {
    margin: 0.5rem 0;
    font-size: 1.5rem;
}

.card .desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.tag {
    background-color: #334155;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: #e2e8f0;
}

.voting {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid #334155;
    background-color: #1e293b;
    color: var(--text-primary);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.vote-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.vote-btn.upvote:hover {
    background-color: #065f46;
    border-color: #10b981;
}

.vote-btn.downvote:hover {
    background-color: #7f1d1d;
    border-color: #ef4444;
}

.vote-count {
    font-weight: 600;
    min-width: 20px;
}

.btn {
    margin-top: auto;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--accent);
    color: #0f172a;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.monospace {
    font-family: 'Courier New', Courier, monospace;
}

/* Hamburger Menu Button */
.hamburger-btn {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    background-color: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background-color: var(--accent);
}

.hamburger-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover span {
    background-color: #0f172a;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--card-bg);
    border-right: 2px solid var(--accent);
    z-index: 1001;
    transition: left 0.3s ease;
    padding: 2rem 0;
}

.side-menu.active {
    left: 0;
}

.side-menu .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.side-menu .close-btn:hover {
    color: var(--accent);
}

.side-menu nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 3rem;
}

.side-menu nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.side-menu nav a:hover {
    background-color: rgba(251, 191, 36, 0.1);
    border-left-color: var(--accent);
    padding-left: 2.5rem;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-content .close-btn:hover {
    color: var(--accent);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid #334155;
    background-color: #1e293b;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-content textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-content .btn {
    margin-top: 0.5rem;
    width: 100%;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid #334155;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    min-width: 40px;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.pagination button.active {
    background-color: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
    font-weight: 600;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0.5rem;
}