/* General Body Styling */
html {
    scrollbar-gutter: stable;
}

body {
    background-color: #0D0F11;
    color: #FFFFFF;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #14171A;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: block;
    height: 40px;
}

.logo img {
    height: 100%;
}

/* Rounded corners for top-left logo */
.logo a {
    overflow: hidden;
    /* ensure image corners are clipped */
    border-radius: 8px;
}

.logo img {
    display: block;
    border-radius: 8px;
}

/* Slightly shift the logo left without affecting header padding/layout */
.logo {
    transform: translateX(-8px);
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;

}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.username-button {
    display: flex;
    align-items: center;
    background-color: transparent;
    color: #FFFFFF;
    border: 1px solid #66B7FF;
    padding: 0.5rem 0.8rem;
    /* Slightly reduced padding */
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    max-width: 160px;
    /* Overall max width */
}

#user-name {
    display: inline-block;
    max-width: 12ch;
    /* Approx 12 chars as requested */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #14171A;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border-radius: 5px;
    padding: 0.5rem 0;
}

.dropdown-content a {
    color: #FFFFFF;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #0D0F11;
    color: #66B7FF;
}

.dropdown-content a.disabled {
    color: #555;
    /* Grayed out text */
    pointer-events: none;
    /* Disables click events */
    cursor: not-allowed;
    /* Shows a 'not-allowed' cursor on hover */
}

.user-dropdown.show .dropdown-content {
    display: block;
}


.discord-button {
    background: linear-gradient(to right, #5865F2, #7289DA);
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.login .discord-button:hover {
    background: linear-gradient(to right, #4a54c4, #5f73b8);
}

/* Make the small header login/register links match the hero/discord button style */
.btn-login-register {
    background: linear-gradient(to right, #5865F2, #7289DA);
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
    display: inline-block;
    font-weight: 600;
}

.btn-login-register:hover {
    background: linear-gradient(to right, #4a54c4, #5f73b8);
}

main {
    padding-top: 66px;
    /* Adjust based on nav height */
}

#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-image: url('background.png');
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 15, 17, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.animated-headline {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.animated-headline span {
    opacity: 0;
    animation: fadeInLetter 0.5s forwards;
}

@keyframes fadeInLetter {
    to {
        opacity: 1;
    }
}

.subtitle {
    font-size: 1.5rem;
    color: #66B7FF;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.discord-button-hero {
    background: linear-gradient(to right, #5865F2, #7289DA);
    color: #FFFFFF;
    padding: 1rem 2rem;
    border-radius: 15px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background 0.3s;
}

.discord-button-hero:hover {
    background: linear-gradient(to right, #4a54c4, #5f73b8);
}

.ip-copy-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(20, 23, 26, 0.8);
    border: 1px solid rgba(102, 183, 255, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    margin: 1.5rem auto;
    max-width: fit-content;
    gap: 0.2rem;
    box-shadow: none;
    transition: all 0.3s ease;
}

.ip-copy-container:hover {
    border-color: rgba(102, 183, 255, 0.4);
    box-shadow: 0 2px 8px rgba(102, 183, 255, 0.1);
}

#ip-address {
    font-size: 1.1rem;
    font-weight: 500;
    color: #FFFFFF;
    letter-spacing: 0.3px;
}

.ip-text {
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.ip-text:hover {
    color: #66B7FF;
}

#copy-ip-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#copy-ip-button:hover {
    background: rgba(102, 183, 255, 0.1);
    transform: scale(1.05);
}

#copy-ip-button:active {
    transform: scale(0.95);
}

#copy-ip-button img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#copy-ip-button:hover img {
    opacity: 1;
}

.copy-feedback {
    position: absolute;
    background-color: #66B7FF;
    color: #0D0F11;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    white-space: nowrap;
    left: 50%;
    transform: translateX(-50%);
    top: -35px;
    box-shadow: 0 4px 12px rgba(102, 183, 255, 0.3);
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

/* Position relative for copy feedback */
.ip-copy-container {
    position: relative;
}

#key-facts {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 4rem 2rem;
    background-color: #14171A;
}

.fact-card {
    background-color: #0D0F11;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.fact-card h3 {
    color: #66B7FF;
    margin-top: 0;
    font-weight: bold;
}

#about {
    padding: 4rem 2rem;
    text-align: center;
}

#about h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-content {
    display: flex;
    justify-content: center;
    gap: 4rem;
    text-align: left;
}

.about-content ul {
    list-style: none;
    padding: 0;
}

.about-content ul li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.roles {
    background-color: #14171A;
    padding: 2rem;
    border-radius: 10px;
}

/* Gallery grid styles */
.gallery-container {
    padding: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #0D0F11;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Use background-image thumbs to match hero background technique */
.gallery-item .thumb {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    display: block;
    transition: transform .3s ease, filter .2s ease;
    cursor: pointer;
}

.gallery-item:hover .thumb {
    transform: scale(1.05);
}

.gallery-modal .modal-img {
    width: 80%;
    height: 80%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
}

/* Modal / lightbox */
.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.gallery-modal.show {
    display: flex;
}

.gallery-modal img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.gallery-modal .close-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

/* Bewerbungsseite Styles */
.apply-hero {
    padding: 3rem 1rem 1rem;
}

.apply-hero .lead {
    max-width: 900px;
    margin: 0.5rem auto 0;
    color: #dfefff;
    opacity: 0.9;
}

.applications .container {
    max-width: 1100px;
    margin: 2rem auto 4rem;
    padding: 0 1rem;
}

.applications h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.muted {
    color: #9fb8d9;
}

.app-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.app-item {
    display: block;
}

.app-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, rgba(20, 23, 26, 0.6), rgba(15, 17, 19, 0.6));
    border: 1px solid rgba(102, 183, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.app-meta h3 {
    margin: 0 0 0.25rem;
}

.app-meta .small {
    margin: 0;
    font-size: 0.95rem;
}

.app-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(90deg, #5865F2, #7289DA);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.18);
}

@media(min-width:700px) {
    .app-list {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Table-like layout for Bewerbungen */
.app-table {
    max-width: 1100px;
    margin: 1.25rem auto 3rem;
    border-collapse: collapse;
    width: 100%;
    background: linear-gradient(180deg, rgba(20, 23, 26, 0.6), rgba(15, 17, 19, 0.6));
    border: 1px solid rgba(102, 183, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

.app-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    color: #cfe8ff;
    background: rgba(13, 15, 17, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.app-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.app-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.app-table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.app-left h3 {
    margin: 0 0 0.25rem;
    color: #66B7FF;
}

.app-left .card-date {
    color: #9fb8d9;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.app-left ul {
    margin: 0.25rem 0 0 1.1rem;
}

.app-right {
    text-align: right;
}

.app-right .btn {
    min-width: 160px;
}

@media (max-width: 700px) {
    .app-table thead {
        display: none;
    }

    .app-table tbody tr {
        display: block;
        margin-bottom: 0.75rem;
        border-bottom: none;
    }

    .app-table td {
        display: block;
        padding: 0.75rem 0.9rem;
    }

    .app-right {
        text-align: left;
        margin-top: 0.5rem;
    }
}

/* News-style / Accent Card used on News page — reused for Bewerbungen */
.accent-card {
    background: linear-gradient(180deg, rgba(13, 15, 17, 0.85), rgba(16, 18, 20, 0.85));
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1rem 0;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.accent-card::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 6px;
    background: linear-gradient(180deg, #66B7FF, #3b82f6);
    border-radius: 4px;
}

.accent-card h3 {
    color: #66B7FF;
    margin-top: 0;
}

.accent-card .card-date {
    color: #9fb8d9;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.accent-card ul {
    margin: 0.5rem 0 0 1.25rem;
    text-align: left;
}

.accent-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}


#live-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background-color: #0D0F11;
}

.stat-card {
    background-color: #14171A;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    width: 220px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stat-card h4 {
    color: #66B7FF;
    margin-top: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

/* Subpage specific styles */
#news-page,
#daily-reward-page,
#support-page,
#gallery-page,
#bewerbung-page {
    padding: 8rem 2rem 4rem;
    text-align: center;
}

#news-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.news-card {
    background-color: #14171A;
    border-left: 5px solid #66B7FF;
    padding: 1.5rem;
    border-radius: 5px;
    text-align: left;
}

.news-card h2 {
    margin-top: 0;
    color: #66B7FF;
    font-weight: bold;
}

.news-card .date {
    font-style: italic;
    color: #ccc;
    margin-bottom: 1rem;
}

.news-description {
    color: #ddd;
    margin: 0.5rem 0;
}

.news-content {
    color: #ddd;
    line-height: 1.6;
    margin: 1rem 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.news-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

.reward-info {
    background-color: #14171A;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    margin: 0 auto;
}

#claim-button {
    background: linear-gradient(to right, #5865F2, #7289DA);
    color: #FFFFFF;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

#claim-button:hover {
    background: linear-gradient(to right, #4a54c4, #5f73b8);
}

.support-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.support-button {
    background-color: #14171A;
    color: #FFFFFF;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.support-button:hover {
    background-color: #0D0F11;
}

footer {
    background-color: #14171A;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #66B7FF;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

footer a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #66B7FF;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .animated-headline {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    #key-facts,
    #live-stats {
        flex-direction: column;
        align-items: center;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
    }
}

/* UI Polish: Center Username */
.username-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Winter Theme: Snow Animation */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: #FFF;
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 1px #000;
    user-select: none;
    z-index: 10000;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes snowfall {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* Fix Nav Jitter on Desktop */
@media (min-width: 769px) {
    nav {
        position: relative;
    }

    nav ul {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}


/* Winter Theme: Icicles */
.auth-buttons {
    position: relative;
}

.icicles {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 40px;
    pointer-events: none;
    z-index: 1002;
    /* SVG Data URI for crisp, transparent icicles */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='grad' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:white;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%23d0eaff;stop-opacity:0.8' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 0 L4 25 L8 8 L12 35 L16 10 L20 28 L24 5 L28 32 L32 8 L36 24 L40 4 L44 36 L48 8 L52 30 L56 6 L60 34 L64 10 L68 26 L72 5 L76 38 L80 8 L84 28 L88 6 L92 34 L96 8 L100 0 Z' fill='url(%23grad)' filter='drop-shadow(0 2px 2px rgba(0,0,0,0.2))' /%3E%3C/svg%3E");
    background-size: 100% 100%;
    /* Stretch to fill width */
    background-repeat: no-repeat;
    background-position: top center;
    /* Remove filter here as it's in the SVG or can be applied to container */
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Remove CSS shapes */
.icicles::before,
.icicles::after {
    display: none;
}