:root {
    --primary-color: #FFD700;
    /* Bright Yellow */
    --secondary-color: #FF4500;
    /* Comic Red */
    --accent-color: #1E90FF;
    /* Deep Blue */
    --text-color: #333333;
    --background-color: #f0f0f0;
    --card-bg: #ffffff;
    --border-color: #000000;
    --border-width: 3px;
    --shadow-offset: 5px;
    --font-heading: 'Bangers', cursive;
    --font-body: 'Comic Neue', cursive;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--background-color);
    background-image: radial-gradient(#ccc 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-color);
    font-size: 18px;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 0;
    color: var(--border-color);
    text-shadow: 2px 2px 0px var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Layout --- */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 80px;
    /* Space for fixed header/menu button */
}

.center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Menu Button --- */
.menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.menu_button {
    cursor: pointer;
    transition: transform 0.2s;
}

.menu_button:hover {
    transform: scale(1.1) rotate(-5deg);
}

.menu_button_inner {
    background-color: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
}

.menu_text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--border-color);
}

.menu_logo {
    display: none;
    /* Hide default logo in menu area for now, maybe move to center header */
}

/* --- Sidebar Menu --- */
.menu_side {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background-color: var(--card-bg);
    border-right: var(--border-width) solid var(--border-color);
    z-index: 1001;
    transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    padding: 20px;
    overflow-y: auto;
    box-shadow: 10px 0 20px rgba(0, 0, 0, 0.2);
}

.menu_side.active {
    left: 0;
}

.menu_side_close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu_side_close img {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.menu_side_title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: var(--border-width) solid var(--border-color);
    padding-bottom: 10px;
}

.menu_items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu_item {
    background-color: var(--background-color);
    border: 2px solid var(--border-color);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.menu_item:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateX(5px);
    box-shadow: 3px 3px 0px var(--border-color);
}

.menu_item_title {
    font-weight: bold;
}

.menu_item_count {
    background: var(--border-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* --- Content --- */
.content_text {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 20px;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    max-width: 800px;
    transform: rotate(-1deg);
}

.content_text h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.content_elements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

/* --- Joke Box --- */
.joke_box {
    background-color: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    padding: 0;
    position: relative;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.joke_box:hover {
    transform: translateY(-5px);
}

.joke {
    padding: 20px;
    font-size: 1.2rem;
    flex-grow: 1;
    background-image: linear-gradient(var(--background-color) 1px, transparent 1px);
    background-size: 100% 1.5em;
    /* Lined paper effect */
    line-height: 1.5em;
}

/* --- Actions (Share, Rate) --- */
.share_button {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s;
}

.share_button:hover {
    transform: scale(1.2) rotate(15deg);
}

.rating {
    display: flex;
    border-top: var(--border-width) solid var(--border-color);
    background: #eee;
}

.rating_button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 5px;
}

.rating_button:hover {
    background: #ddd;
}

.rating_button.upvote:hover,
.rating_button.upvote.active {
    background: #d4edda;
}

.rating_button.downvote:hover,
.rating_button.downvote.active {
    background: #f8d7da;
}

.rating_button img {
    width: 24px;
    height: 24px;
}

.rating_button .filled {
    display: none;
}

.rating_button.active .filled {
    display: inline-block;
}

.rating_button.active .outline {
    display: none;
}

.total_votes {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-weight: bold;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    border-left: var(--border-width) solid var(--border-color);
    border-right: var(--border-width) solid var(--border-color);
    background: var(--primary-color);
}

/* --- Home Page Items --- */
.home_page_items {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.home_page_item {
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.home_page_item:hover {
    transform: scale(1.05);
    background: var(--primary-color);
}

.home_page_item_title {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu_item {
    background-color: var(--background-color);
    border: 2px solid var(--border-color);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.menu_item:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateX(5px);
    box-shadow: 3px 3px 0px var(--border-color);
}

.menu_item_title {
    font-weight: bold;
}

.menu_item_count {
    background: var(--border-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* --- Content --- */
.content_text {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 20px;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    max-width: 800px;
    transform: rotate(-1deg);
}

.content_text h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.content_elements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

/* --- Joke Box --- */
.joke_box {
    background-color: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    padding: 0;
    position: relative;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.joke_box:hover {
    transform: translateY(-5px);
}

.joke {
    padding: 20px;
    font-size: 1.2rem;
    flex-grow: 1;
    background-image: linear-gradient(var(--background-color) 1px, transparent 1px);
    background-size: 100% 1.5em;
    /* Lined paper effect */
    line-height: 1.5em;
}

/* --- Actions (Share, Rate) --- */
.share_button {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border: var(--border-width) solid var(--border-color);
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s;
}

.share_button:hover {
    transform: scale(1.2) rotate(15deg);
}

.rating {
    display: flex;
    border-top: var(--border-width) solid var(--border-color);
    background: #eee;
}

.rating_button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 5px;
}

.rating_button:hover {
    background: #ddd;
}

.rating_button.upvote:hover,
.rating_button.upvote.active {
    background: #d4edda;
}

.rating_button.downvote:hover,
.rating_button.downvote.active {
    background: #f8d7da;
}

.rating_button img {
    width: 24px;
    height: 24px;
}

.rating_button .filled {
    display: none;
}

.rating_button.active .filled {
    display: inline-block;
}

.rating_button.active .outline {
    display: none;
}

.total_votes {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-weight: bold;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    border-left: var(--border-width) solid var(--border-color);
    border-right: var(--border-width) solid var(--border-color);
    background: var(--primary-color);
}

/* --- Home Page Items --- */
.home_page_items {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.home_page_item {
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.home_page_item:hover {
    transform: scale(1.05);
    background: var(--primary-color);
}

.home_page_item_title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.home_page_item_amount {
    font-weight: bold;
    color: var(--secondary-color);
}

/* --- Ads --- */
.ad_container {
    border: var(--border-width) solid var(--border-color);
    background: white;
    padding: 10px;
    margin: 20px 0;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.adsbygoogle {
    display: block;
    width: 100%;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .content_elements {
        grid-template-columns: 1fr;
    }

    .content_text h1 {
        font-size: 2rem;
    }
}