/* Prevent horizontal overflow and ensure we capture horizontal swipes */
html, body {
    overflow-x: hidden;
    touch-action: pan-y;
}

/* ------------------ Global Container ------------------ */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ------------------ Global Base Styles ------------------ */
body {
    background: white;
    color: black;
    font-family: Arial, sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
}
body.dark-mode {
    background: black;
    color: white;
}

/* ------------------ Header (Public & Admin) ------------------ */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
    position: relative;
}
.header-left, .header-center, .header-right, .header-toggle {
    flex: 1;
}
.header-left { text-align: left; }
.header-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.header-right { text-align: right; }

/* ------------------ Pagination Links ------------------ */
.prev-link,
.next-link {
    text-decoration: none;
    display: inline-block;
    transform: scale(1.1);
    transition: transform 0.3s ease;
    margin: 0 5px;
}
.prev-link:hover,
.prev-link:active {
    animation: spin-cw 0.5s ease-in-out;
}
.next-link:hover,
.next-link:active {
    animation: spin-ccw 0.5s ease-in-out;
}
@keyframes spin-cw {
    from { transform: scale(1.1) rotate(0deg); }
    to   { transform: scale(1.1) rotate(-360deg); }
}
@keyframes spin-ccw {
    from { transform: scale(1.1) rotate(0deg); }
    to   { transform: scale(1.1) rotate(360deg); }	
}

/* ------------------ Desktop-only elements ------------------ */
.desktop-only {
    display: block;
}

/* ------------------ Home Link ------------------ */
.home-link {
    text-decoration: none;
    color: inherit;
}
.home-link img {
    border: none;
}

/* ------------------ Navigation Links ------------------ */
.header-left a, .header-right a {
    text-decoration: none;
    color: inherit;
    margin: 0 5px;
}
.pipe {
    margin: 0 5px;
}

/* ------------------ Logo & Emoji ------------------ */
.emoji {
    font-size: 400%;
    margin-bottom: 5px;
}
.site-logo {
    max-width: 250px;
    display: block;
    margin: 0 auto;
}
.logo-dark {
    display: none;
}
body.dark-mode .logo-light {
    display: none;
}
body.dark-mode .logo-dark {
    display: block;
}

/* ------------------ Header Toggle (Dark/Light) ------------------ */
.header-toggle {
    position: absolute;
    right: 20px;
    top: 10px;
}
.header-toggle a img {
    width: 30px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.header-toggle a img:hover {
    opacity: 0.8;
}

/* ------------------ Mobile Menu Icon ------------------ */
.mobile-menu-icon {
    display: none !important;
}

/* ------------------ Mobile Navigation Menu ------------------ */
.mobile-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 10px;
    background: white;
    border: 1px solid #ccc;
    width: 200px;
    z-index: 1000;
    padding: 10px;
}
.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-menu ul li {
    margin-bottom: 10px;
}
.mobile-menu ul li a {
    text-decoration: none;
    color: inherit;
}


/* ------------------ Mobile-Specific Styles ------------------ */
@media screen and (max-width: 768px) {
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: white;
        border-bottom: 1px solid #ccc;
    }
    .site-header .header-emoji {
    	font-size: 6rem;
    	transform: none !important;
    	margin-bottom: 0.3rem;
    }
    body.dark-mode .site-header {
        background: black;
        border-bottom: 1px solid #fff;
    }
    .container {
        margin-top: calc(var(--header-height) + 20px);
        padding-top: 0;
    }
    .mobile-menu-icon {
        display: block !important;
        font-size: 2em;
        position: absolute;
        left: 10px;
        top: 10px;
        cursor: pointer;
        z-index: 1001;
    }
    .desktop-only {
        display: none !important;
    }
    .header-toggle {
        right: 10px;
        top: 10px;
    }
    .mobile-menu.open {
        display: block;
        left: 10px;
    }
    .header-center .emoji {
        font-size: 500%;
    }
    .header-center .site-logo {
        max-width: 300px;
    }
    body.dark-mode .mobile-menu {
        background: black;
        border: 1px solid #fff;
    }
}

/* ------------------ Public Page: Post Styles ------------------ */
.post {
    padding: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed black;
}
body.dark-mode .post {
    border-bottom: 1px dashed white;
}
.post-header {
    display: block !important;
    width: 100%;
    margin-bottom: 10px;
    font-size: 1.5em;
}
.post-header .post-date,
.post-header .separator,
.post-header .post-title {
    display: inline;
    margin-right: 5px;
}
.post-title a {
    text-decoration: none;
    color: inherit;
}
.post-image {
    display: block;
    width: 100%;
    margin-top: 10px;
    clear: both;
}
.post-image img {
    max-width: 200px;
    display: block;
    margin: 0 0 4px 0;
}
.post-image-subtitle {
    font-size: 0.7em;
    color: black;
    text-align: left;
    margin-top: 2px;
    max-width: 200px;
}
body.dark-mode .post-image-subtitle {
    color: white;
}
.post-content {
    margin: 10px 0;
}

/* ------------------ Voting buttons ------------------ */
.vote-button {
    text-decoration: none;
}
.vote-text {
    margin-left: 4px;
}

/* ------------------ Additional Styling for Image+Vote Layout ------------------ */
.post-image-vote {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 10px;
}
.post-image-vote .post-image {
    width: auto;
    clear: none;
    margin: 0;
    float: none;
}

/* Mobile adjustment for image+vote layout */
@media (max-width: 600px) {
    .post-image-vote {
        flex-direction: column;
        align-items: center;
    }
    .vote-section {
        margin-left: 0 !important;
    }
}

/* ------------------ Admin Page Specific Styles ------------------ */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}
table, th, td {
    border: 1px solid #ccc;
}
th, td {
    padding: 8px;
    text-align: left;
}
body.dark-mode table,
body.dark-mode th,
body.dark-mode td {
    border: 1px solid #fff;
}
.pagination {
    text-align: center;
    margin: 10px 0;
}
.pagination a {
    text-decoration: none;
    color: inherit;
    margin: 0 5px;
}

/* ------------------ About & Takedown Content ------------------ */
.about-content, .takedown-content {
    padding: 15px;
    margin: 20px auto;
    max-width: 800px;
    line-height: 1.6;
}

/* ------------------ Submission Page Specific Styles ------------------ */
/* Numbered field labels */
.field-number {
    font-weight: bold;
    margin-right: 5px;
    background: #eee;
    padding: 2px 6px;
    border-radius: 50%;
    display: inline-block;
    width: 24px;
    text-align: center;
    color: black !important;
}

/* Container for form and preview image */
.submit-scroll-container {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
}
.form-container,
.preview-container {
    flex: 1;
    min-width: 300px;
    padding: 10px;
}

/* Preview images */
.desktop-preview {
    display: none;
}
.mobile-preview {
    display: none;
}
@media (min-width: 768px) {
    .desktop-preview {
        display: block;
    }
}
@media (max-width: 767px) {
    .mobile-preview {
        display: block;
    }
    .swipe-indicator {
        font-size: 0.9em;
        color: #666;
        text-align: center;
        margin-top: 5px;
    }
}

/* ------------------ Drop Zone Styles ------------------ */
.dropzone {
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 10px;
}
.dropzone.dragover {
    background-color: #f0f0f0;
    border-color: #333;
}

/* ------------------ Error Message ------------------ */
.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
}

/* ------------------ Share Link Styling ------------------ */
.share-link {
    font-size: 0.9em;
    color: #fff;
    background-color: #007BFF;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    margin-top: 5px;
    display: inline-block;
}
.share-link:hover {
    background-color: #0056b3;
}

/* ------------------ Emoji Scaling ------------------ */
.emoji {
    display: inline-block;
    transform: scale(0.5);
    transition: transform 0.2s ease-in-out;
}
.emoji-large {
    transform: scale(1.2);
}

/* ------------------ Vote Button Colors ------------------ */
/* Light mode */
.vote-button {
    color: black;
    text-decoration: none;
}
/* Dark mode */
body.dark-mode .vote-button {
    color: white;
    text-decoration: none;
}

/* desktop only */
@media screen and (min-width: 769px) {
  header.site-header .emoji.header-emoji {
  	transform: none !important;
    font-size: 4rem; /* or 500% or whatever you like */;
    margin-bottom: 0.5rem;
  }
}