/* ============================================
   RESET & BASE
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #FFF8F2;
    color: #1a1a1a;
    min-height: 100vh;
    padding-bottom: 120px;
}

/* ============================================
   HEADER
   ============================================ */

header {
    background: #FF8C00;
    padding: 28px 24px 24px;
    text-align: center;
    margin-bottom: 0;
}

header h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

header p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 6px;
    font-weight: 400;
}

/* ============================================
   MAIN
   ============================================ */

main {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 20px 140px;
}

/* Welcome text — used as plain <p> inside <main> */
main > p {
    text-align: center;
    font-size: 0.95rem;
    color: #6b6b6b;
    line-height: 1.65;
    margin-bottom: 36px;
}

/* ============================================
   BUTTONS
   ============================================ */

.button-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    border-radius: 8px;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

/* Default nav button = outline */
.button-container .btn:not(.btn-active) {
    background: #fff;
    color: #1a1a1a;
    border-color: #e0e0e0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.button-container .btn:not(.btn-active):hover {
    border-color: #FF8C00;
    color: #FF8C00;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(255, 140, 0, 0.14);
}

.btn:active { transform: translateY(0); }

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* Single button (e.g. in forms) */
form .btn,
.btn-single {
    background: #FF8C00;
    color: #fff;
    border-color: #FF8C00;
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.28);
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
}

form .btn:hover,
.btn-single:hover {
    background: #e07c00;
    border-color: #e07c00;
    box-shadow: 0 4px 16px rgba(255, 140, 0, 0.35);
}

.vote-btn {
    flex: 1;
    max-width: 150px;
}

/* ============================================
   MEME CONTAINER
   ============================================ */

.meme-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 28px auto;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    overflow: hidden;
}

.meme-container img {
    width: 100%;
    display: block;
}

.meme-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: white;
    text-shadow:
        2px  2px 0 rgba(0,0,0,0.65),
        -2px -2px 0 rgba(0,0,0,0.65),
        2px -2px 0 rgba(0,0,0,0.65),
        -2px  2px 0 rgba(0,0,0,0.65);
    word-wrap: break-word;
    padding: 10px;
}

.meme-text.top    { top: 12px; }
.meme-text.bottom { bottom: 12px; }

/* ============================================
   FORMS
   ============================================ */

form {
    max-width: 520px;
    margin: 28px auto;
    padding: 28px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 16px;
    background: #FAFAFA;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1a1a1a;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    background: #fff;
    border-color: #FF8C00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* ============================================
   STATS
   ============================================ */

.stats-container {
    max-width: 520px;
    margin: 20px auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    text-align: center;
}

.stats-container p {
    font-size: 0.88rem;
    color: #888;
    margin: 6px 0;
}

.vote-count {
    font-size: 2.4rem;
    font-weight: 700;
    color: #FF8C00;
    letter-spacing: -0.04em;
    margin: 8px 0 4px;
    line-height: 1;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 13px 16px;
    border-radius: 8px;
    margin: 16px auto;
    max-width: 520px;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border-color: #FDE68A;
}

.alert-success {
    background: #F0FDF4;
    color: #166534;
    border-color: #BBF7D0;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

/* ============================================
   HALL OF FAME
   ============================================ */

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 8px 0 28px;
}

.meme {
    margin-bottom: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.meme:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}

.votes-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #FF8C00;
    padding: 12px 16px;
    background: #FFF8F2;
    border-top: 1px solid #e8e8e8;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-sizing: border-box;
}

.footer-left a {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.footer-left a:hover { color: #FF8C00; }

.footer-center p {
    font-size: 0.75rem;
    color: #aaa;
}

.footer-right {
    display: flex;
    gap: 16px;
}

.footer-right a {
    font-size: 0.75rem;
    font-weight: 500;
    color: #aaa;
    text-decoration: none;
}

.footer-right a:hover { color: #FF8C00; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    header h1 { font-size: 1.4rem; }

    main { padding: 32px 16px; }

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

    .button-container .btn {
        width: 100%;
        max-width: 280px;
    }

    form { padding: 20px 16px; }

    footer {
        height: auto;
        flex-direction: column;
        gap: 6px;
        padding: 12px 20px;
    }

    body { padding-bottom: 100px; }
}

/* Active / clicked button state */
.btn-outline {
    background: #fff;
    color: #1a1a1a;
    border-color: #e0e0e0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.btn-outline:hover {
    border-color: #FF8C00;
    color: #FF8C00;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(255,140,0,0.14);
}

.btn-active {
    background: #FF8C00 !important;
    color: #fff !important;
    border-color: #FF8C00 !important;
    box-shadow: 0 2px 10px rgba(255,140,0,0.28) !important;
}

/* Only nav links should be non-clickable when active */
a.btn-active {
    cursor: default;
    pointer-events: none;
}

/* Header title link */
header h1 a,
header h1 a:visited,
header h1 a:active {
    color: #fff;
    text-decoration: none;
}

header h1 a:hover {
    opacity: 0.85;
}

/* ============================================
   VOTED DONE STATE
   ============================================ */

.voted-done {
    text-align: center;
    padding: 56px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    max-width: 420px;
    margin: 32px auto;
}

.voted-done-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.voted-done h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.voted-done p {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.65;
    margin-bottom: 20px;
}

/* ============================================
   INFO CARD (Imprint / Privacy)
   ============================================ */

.info-card {
    max-width: 520px;
    margin: 0 auto 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.info-card-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FF8C00;
    margin-bottom: 16px;
}

.info-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-card-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-card-key {
    font-size: 0.82rem;
    color: #aaa;
    font-weight: 500;
}

.info-card-val {
    font-size: 0.88rem;
    color: #1a1a1a;
    font-weight: 500;
}

.info-card-val a {
    color: #FF8C00;
    text-decoration: none;
}

.info-card-val a:hover {
    text-decoration: underline;
}

.info-card-text {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.65;
}

/* ============================================
   SUBMIT BUTTON (form, independent)
   ============================================ */

.btn-submit {
    display: block;
    width: 100%;
    padding: 13px;
    margin-top: 4px;
    background: #FF8C00;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
    box-shadow: 0 2px 10px rgba(255,140,0,0.28);
}

.btn-submit:hover {
    background: #e07c00;
    box-shadow: 0 4px 16px rgba(255,140,0,0.35);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ============================================
   VOTE ACTION BUTTONS (Like / Dislike / Next)
   ============================================ */

.vote-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 40px;
}

.vote-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.vote-action-btn:hover:not(:disabled) {
    border-color: #FF8C00;
    color: #FF8C00;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(255,140,0,0.14);
}

.vote-action-btn.active {
    background: #FF8C00;
    color: #fff;
    border-color: #FF8C00;
    box-shadow: 0 2px 10px rgba(255,140,0,0.28);
}

.vote-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}