/* === GLOBAL STYLES === */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #36393f;
    color: #dcddde;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    padding-top: 20px; /* Adjust padding-top to account for fixed header if needed, or move header out of flow */
    padding-bottom: 20px;
}

a, a:visited {
    color: #00AFF4;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h2, h3 {
    color: #ffffff;
}

/* === HEADER STYLES === */
.site-header {
    background-color: #202225;
    width: 100%;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px; /* Space between header and first section */
    position: sticky; /* Make header sticky */
    top: 0;
    z-index: 1000;
}

.site-header .header-content {
    max-width: 1200px; /* Adjust as needed */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.site-header .site-title {
    color: #ffffff;
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
}

.site-header .main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.site-header .main-nav li {
    margin-left: 25px;
}

.site-header .main-nav a {
    color: #dcddde;
    font-weight: 500;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.site-header .main-nav a:hover {
    color: #00AFF4;
    text-decoration: none;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .site-header .header-content {
        flex-direction: column;
        text-align: center;
    }

    .site-header .site-title {
        margin-bottom: 15px;
    }

    .site-header .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .site-header .main-nav li {
        margin: 0;
    }
}


/* === SECTION DIVIDER === */
.section-divider {
    width: 80%;
    max-width: 700px;
    border: 0;
    height: 1px;
    background-color: #40444b;
    margin: 30px auto;
}

/* === LINK GENERATOR SECTION STYLES (zolw22) === */
#link-generator-section {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
    padding-top: 20px; /* Add padding-top for anchor link scroll offset */
    scroll-margin-top: 80px; /* Adjust based on header height */
}

#link-generator-section .generator-box {
    background-color: #2f3136;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

#link-generator-section .generator-box h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 600;
}

#link-generator-section .generator-box label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-align: left;
    color: #b9bbbe;
}

#link-generator-section .generator-box input[type="text"],
#link-generator-section .generator-box input[type="url"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #202225;
    border-radius: 3px;
    background-color: #40444b;
    color: #dcddde;
    font-size: 1em;
    box-sizing: border-box;
}

#link-generator-section #preview-area {
    background-color: #202225;
    padding: 10px 15px;
    border-radius: 3px;
    margin-top: 5px;
    margin-bottom: 20px;
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
}

#link-generator-section .preview-text {
    font-size: 0.9em;
    margin: 0;
    text-align: center;
}

#link-generator-section .preview-text.placeholder {
    color: #72767d;
    font-style: italic;
}

#link-generator-section .preview-text.error {
    color: #f04747;
    font-style: normal;
}

#link-generator-section #preview-area a {
    color: #00aff4;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
}

#link-generator-section #preview-area a:hover {
    text-decoration: underline;
}

#link-generator-section .generator-box button#copy-button {
    padding: 12px 20px;
    background-color: #7289da;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#link-generator-section .generator-box button#copy-button:hover {
    background-color: #677bc4;
}

#link-generator-section .feedback {
    margin-top: 15px;
    height: 20px;
    font-size: 0.9em;
    color: #43b581;
    font-weight: 500;
}

/* === ANSI EDITOR SECTION STYLES (discord) === */
#ansi-editor-section {
    text-align: center;
    color: #FFF;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px; /* Add padding-top for anchor link scroll offset */
    scroll-margin-top: 80px; /* Adjust based on header height */
}

#ansi-editor-section .container {
    max-width: 650px;
    margin: auto;
    width: 90%;
}

#ansi-editor-section .flex {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ansi-editor-section #textarea {
    width: 600px;
    max-width: 100%;
    height: 200px;
    border-radius: 5px;
    resize: both;
    overflow: auto;
    text-align: left;
    font-family: monospace;
    background-color: #2F3136;
    color: #B9BBBE;
    border: #202225 1px solid;
    padding: 5px;
    display: inline-block;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.125rem;
    text-indent: 0;
    box-sizing: border-box;
}

#ansi-editor-section .button {
    min-height: 32px;
    min-width: 32px;
    border: none;
    border-radius: 3px;
    color: #fff;
    background-color: #4f545c;
    font-size: 14px;
    padding: 2px 16px;
    cursor: pointer;
    transition: background-color 250ms linear;
    margin: 2px;
}
#ansi-editor-section .button:hover {
    background-color: #5c616a;
}

#ansi-editor-section .tooltip {
    display: none;
    position: absolute;
    background-color: #3BA55D;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 14px;
    padding: 8px 16px;
    top: 0;
    z-index: 10;
}

/* Style ANSI */
#ansi-editor-section .ansi-1 { font-weight:700; text-decoration:none;       }
#ansi-editor-section .ansi-4 { font-weight:500; text-decoration:underline;  }

#ansi-editor-section .ansi-30 { color: #4f545c; }
#ansi-editor-section .ansi-31 { color: #dc322f; }
#ansi-editor-section .ansi-32 { color: #859900; }
#ansi-editor-section .ansi-33 { color: #b58900; }
#ansi-editor-section .ansi-34 { color: #268bd2; }
#ansi-editor-section .ansi-35 { color: #d33682; }
#ansi-editor-section .ansi-36 { color: #2aa198; }
#ansi-editor-section .ansi-37 { color: #ffffff; }

#ansi-editor-section .ansi-30-bg { background-color: #4f545c !important; }
#ansi-editor-section .ansi-31-bg { background-color: #dc322f !important; }
#ansi-editor-section .ansi-32-bg { background-color: #859900 !important; }
#ansi-editor-section .ansi-33-bg { background-color: #b58900 !important; }
#ansi-editor-section .ansi-34-bg { background-color: #268bd2 !important; }
#ansi-editor-section .ansi-35-bg { background-color: #d33682 !important; }
#ansi-editor-section .ansi-36-bg { background-color: #2aa198 !important; }
#ansi-editor-section .ansi-37-bg { background-color: #ffffff !important; color: #36393F !important; }

#ansi-editor-section .ansi-40 { background-color: #002b36 !important; }
#ansi-editor-section .ansi-41 { background-color: #cb4b16 !important; }
#ansi-editor-section .ansi-42 { background-color: #586e75 !important; }
#ansi-editor-section .ansi-43 { background-color: #657b83 !important; }
#ansi-editor-section .ansi-44 { background-color: #839496 !important; }
#ansi-editor-section .ansi-45 { background-color: #6c71c4 !important; }
#ansi-editor-section .ansi-46 { background-color: #93a1a1 !important; }
#ansi-editor-section .ansi-47 { background-color: #fdf6e3 !important; color: #36393F !important; }


#ansi-editor-section #copyPreview {
    background-color: #2F3136;
    color: #B9BBBE;
    border: #202225 1px solid;
    border-radius: 5px;
    padding: 10px;
    text-align: left;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 150px;
    overflow-y: auto;
    margin: 10px auto;
    width: 600px;
    max-width: 100%;
    box-sizing: border-box;
    display: inline-block;
}

/* === FOOTER STYLES === */
.site-footer {
    width: 90%;
    max-width: 650px;
    margin-top: 30px;
    padding: 15px 0;
    text-align: center;
    font-size: 0.85em;
    color: #72767d;
    border-top: 1px solid #40444b;
}

.site-footer p {
    margin: 5px 0;
}

/* === QR CODE GENERATOR SECTION STYLES === */
#qr-generator-section {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    padding-top: 20px; /* Add padding-top for anchor link scroll offset */
    scroll-margin-top: 80px; /* Adjust based on header height */
}

#qr-generator-section .generator-box {
    background-color: #2f3136;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

#qr-generator-section .generator-box h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 600;
}

#qr-generator-section .generator-box label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-align: left;
    color: #b9bbbe;
}

#qr-generator-section .generator-box input[type="text"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #202225;
    border-radius: 3px;
    background-color: #40444b;
    color: #dcddde;
    font-size: 1em;
    box-sizing: border-box;
}

#qr-generator-section #qrcode-wrapper { /* New wrapper for QR code and messages */
    background-color: #2f3136; /* Default background same as generator-box */
    padding: 10px;
    border-radius: 3px;
    margin-top: 5px;
    margin-bottom: 20px;
    min-height: 276px; /* Adjusted to fit 256px QR code + padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color 0.3s ease; /* Smooth transition for background change */
}

#qr-generator-section #qrcode { /* This will be the target for QRCode.js */
    display: flex; /* To center the canvas/image generated by QRCode.js */
    justify-content: center;
    align-items: center;
    width: 256px; /* Explicitly set dimensions based on your script */
    height: 256px;
    /* Important: QRCode.js will clear this div and add its own canvas */
}

/* Initially hide the canvas created by QRCode.js when no code is generated */
#qr-generator-section #qrcode canvas {
    display: none;
}


#qr-generator-section .preview-text.placeholder,
#qr-generator-section .preview-text.error {
    text-align: center;
    font-size: 0.9em;
    margin: 5px 0;
}

#qr-generator-section .preview-text.placeholder {
    color: #72767d;
    font-style: italic;
}

#qr-generator-section .preview-text.error {
    color: #f04747;
    font-style: normal;
    background-color: rgba(240, 71, 71, 0.1);
    padding: 5px;
    border-radius: 3px;
}

#qr-generator-section .generator-box button#downloadBtn { /* Updated ID */
    padding: 12px 20px;
    background-color: #43b581; /* Green color for download button */
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#qr-generator-section .generator-box button#downloadBtn:hover { /* Updated ID */
    background-color: #3aa870; /* Darker green on hover */
}

#qr-generator-section .generator-box button#downloadBtn:disabled {
    background-color: #72767d;
    cursor: not-allowed;
}

/* === NOWE STYLE DLA DISCORD USER INFO CHECKER === */
#discord-checker-section {
    text-align: center;
    color: #FFF;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px; /* Dodany margines na dole sekcji */
    padding-top: 20px; /* Add padding-top for anchor link scroll offset */
    scroll-margin-top: 80px; /* Adjust based on header height */
}

#discord-checker-section .container {
    max-width: 550px;
    background-color: #2f3136;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#discord-checker-section .input-group {
    display: flex;
    margin-bottom: 20px;
}

#discord-checker-section #discordUserId {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #202225;
    border-radius: 3px 0 0 3px;
    background-color: #40444b;
    color: #dcddde;
    font-size: 1em;
}

#discord-checker-section #checkButton {
    padding: 10px 15px;
    background-color: #7289da;
    color: white;
    border: none;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

#discord-checker-section #checkButton:hover {
    background-color: #677bc4;
}

#discord-checker-section #loading {
    margin: 20px 0;
    font-style: italic;
    color: #72767d;
}

#discord-checker-section .error-message {
    background-color: #f04747;
    color: #ffffff;
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #aa2828;
    word-wrap: break-word;
}

#discord-checker-section .user-info-card {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #202225;
    border-radius: 5px;
    background-color: #292b2f;
    text-align: left;
    overflow: hidden;
}

#discord-checker-section .avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
}

#discord-checker-section .user-info-card img.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #7289da;
    display: block;
}

#discord-checker-section .avatar-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#discord-checker-section .user-text-info {
    overflow: hidden;
}

#discord-checker-section .user-info-card img.banner {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}
#discord-checker-section .user-info-card .banner[style*="background-color"] {
    width: 100%;
    height: 100px;
    border-radius: 4px;
    margin-bottom: 10px;
}

#discord-checker-section .user-info-card p {
    margin: 6px 0;
    line-height: 1.5;
    word-wrap: break-word;
}

#discord-checker-section .user-info-card strong {
    color: #b9bbbe;
}

#discord-checker-section .user-info-card .username-discriminator {
    font-size: 1.3em;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
    word-break: break-all;
}

#discord-checker-section .user-info-card .global-name-display {
    font-size: 0.9em;
    color: #b9bbbe;
    margin-top: -2px;
    margin-bottom: 8px;
}

#discord-checker-section .user-info-card .flags {
    margin-top: 5px;
}

#discord-checker-section .user-info-card .flags span {
    display: inline-block;
    background-color: #4f545c;
    color: #dcddde;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Style dla informacji o serwerach w Discord Checker */
#discord-checker-section .server-info-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #40444b;
}

#discord-checker-section .server-info-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #7289da;
    font-size: 1.1em;
}

#discord-checker-section .server-info-details p {
    margin: 5px 0;
    font-size: 0.9em;
}

#discord-checker-section .server-info-details .status-ok { color: #43b581; }
#discord-checker-section .server-info-details .status-banned { color: #f04747; font-weight: bold; }
#discord-checker-section .server-info-details .status-not-member { color: #faa61a; }
#discord-checker-section .server-info-details .status-error { color: #f04747; font-style: italic; }
#discord-checker-section .server-info-details .status-owner { color: #f1c40f; font-weight: bold; }
#discord-checker-section .server-info-details .status-admin { color: #e67e22; font-weight: bold; }

#discord-checker-section .server-info-details .reason {
    font-style: italic;
    color: #b9bbbe;
    margin-left: 15px;
}

#discord-checker-section .server-info-details .role-list {
    margin-top: 5px;
    margin-bottom: 5px;
}

#discord-checker-section .server-info-details .role-tag {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 1px solid transparent;
    line-height: 1.2;
}

#discord-checker-section .server-info-details .guild-avatar-container {
    margin-top: 5px;
    display: flex;
    align-items: center;
}
#discord-checker-section .server-info-details .guild-avatar-container img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #4f545c;
    margin-right: 8px;
}
#discord-checker-section .server-info-details .guild-avatar-container span {
    font-size: 0.85em;
    color: #b9bbbe;
}