* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Arial', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
}

body.light-theme {
    background-color: #f0f4f8;
    color: #1a1a1a;
}

body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 400px;
    height: auto;
}

.logo-light {
    display: none;
}

body.light-theme .logo-dark {
    display: none;
}

body.light-theme .logo-light {
    display: block;
}

body.dark-theme .logo-light {
    display: none;
}

body.dark-theme .logo-dark {
    display: block;
}

.logo-link {
    text-decoration: none;
}

.container {
    background: #ffffff;
    padding: 20px;
    border: 2px solid #00d1ff;
    width: 100%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 0;
    position: relative;
}

body.dark-theme .container {
    background: #2a2a2a !important;
    border-color: #ff00ff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #00d1ff;
}

body.dark-theme h1 {
    color: #ff00ff !important;
}

h2 {
    font-size: 18px;
    margin: 20px 0 10px;
    color: #007bff;
}

body.dark-theme h2 {
    color: #ff4081 !important;
}

p {
    margin-bottom: 15px;
    font-size: 16px;
}

input[type="url"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #00d1ff;
    font-size: 16px;
    box-sizing: border-box;
}

body.dark-theme input[type="url"],
body.dark-theme input[type="text"],
body.dark-theme input[type="password"] {
    border-color: #ff00ff !important;
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #00d1ff;
    font-size: 16px;
    resize: vertical;
    box-sizing: border-box;
}

body.dark-theme textarea {
    border-color: #ff00ff !important;
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
}

button,
.button {
    padding: 15px 25px;
    background: #04d1ff;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    font-weight: bold;
    min-width: 120px;
    height: 50px;
    line-height: 16px;
    box-sizing: border-box;
    margin: 5px;
}

button:hover,
.button:hover {
    background: #3089ff;
}

body.dark-theme button,
body.dark-theme .button {
    background: #ff4081 !important;
}

body.dark-theme button:hover,
body.dark-theme .button:hover {
    background: #d81b60 !important;
}

.copy-button[copied="true"] {
    background: #28a745 !important;
}

body.dark-theme .copy-button[copied="true"] {
    background: #2ecc71 !important;
}

.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3;
}

.theme-checkbox {
    display: none;
}

.theme-label {
    display: inline-block;
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.theme-label::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.theme-checkbox:checked + .theme-label {
    background: #007bff;
}

body.dark-theme .theme-label {
    background: #ff4081;
}

body.dark-theme .theme-checkbox:checked + .theme-label {
    background: #d81b60;
}

.theme-checkbox:checked + .theme-label::after {
    transform: translateX(26px);
}

body.dark-theme .theme-label::after {
    background: #e0e0e0;
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    margin: 10px 0;
}

.option-group {
    margin: 5px 0;
    position: relative;
}

.option-group.full-width {
    flex: 1 1 100%;
}

.option-group.half-width {
    flex: 1 1 48%;
    margin: 5px 1%;
}

.option-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.option-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.option-group select,
.option-group input[type="text"] {
    width: 100%;
    padding: 5px;
    font-size: 14px;
}

.option-group input[type="checkbox"] {
    margin-right: 5px;
}

.option-group:not(.options-container .option-group) {
    flex: 1 1 100%;
    margin: 10px 0;
}

.syntax-dropdown {
    position: absolute;
    background: #ffffff;
    border: 1px solid #00d1ff;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body.dark-theme .syntax-dropdown {
    background: #2a2a2a !important;
    border-color: #ff00ff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5) !important;
}

.syntax-item {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
}

body.dark-theme .syntax-item {
    color: #e0e0e0 !important;
}

.syntax-item:hover {
    background: #e0f7fa;
}

body.dark-theme .syntax-item:hover {
    background: #4a2c5e !important;
}

.footer {
    background: #ffffff;
    padding: 10px 20px;
    border: 2px solid #00d1ff;
    width: 100%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

body.dark-theme .footer {
    background: #2a2a2a !important;
    border-color: #ff00ff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}

.footer-links a {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
}

body.dark-theme .footer-links a {
    color: #ff4081 !important;
}

.footer-links a:hover {
    text-decoration: underline;
}

body.dark-theme .footer-links a:hover {
    color: #d81b60 !important;
}

.additional-footer {
    background: #f5f5f5;
    padding: 10px 20px;
    border: 2px dashed #00d1ff;
    width: 100%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

body.dark-theme .additional-footer {
    background: #333333 !important;
    border-color: #ff00ff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}

.additional-footer p {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #007bff;
}

body.dark-theme .additional-footer p {
    color: #ff4081 !important;
}

.additional-footer-links a {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
}

body.dark-theme .additional-footer-links a {
    color: #ff4081 !important;
}

.additional-footer-links a:hover {
    text-decoration: underline;
}

body.dark-theme .additional-footer-links a:hover {
    color: #d81b60 !important;
}

#pick_url_container {
    display: none;
}

#result {
    margin-top: 20px;
}

.info-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.info-lightbox-content {
    background: #ffffff;
    padding: 20px;
    border: 2px solid #00d1ff;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.dark-theme .info-lightbox-content {
    background: #2a2a2a !important;
    border-color: #ff00ff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
    color: #e0e0e0 !important;
}

.info-lightbox-content h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #00d1ff;
}

body.dark-theme .info-lightbox-content h1 {
    color: #ff00ff !important;
}

.info-lightbox-content p {
    margin-bottom: 15px;
    font-size: 16px;
}

.info-lightbox-content form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-lightbox-content input[type="text"],
.info-lightbox-content textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #00d1ff;
    font-size: 16px;
    box-sizing: border-box;
}

body.dark-theme .info-lightbox-content input[type="text"],
body.dark-theme .info-lightbox-content textarea {
    border-color: #ff00ff !important;
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
}

.info-lightbox-content button {
    padding: 15px 25px;
    background: #04d1ff;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: bold;
}

body.dark-theme .info-lightbox-content button {
    background: #ff4081 !important;
}

body.dark-theme .info-lightbox-content button:hover {
    background: #d81b60 !important;
}

.info-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

body.dark-theme .info-lightbox-close {
    color: #999 !important;
}

/* Paste metadata styling */
.paste-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

body.dark-theme .paste-meta {
    color: #aaa !important;
}

.paste-meta .syntax,
.paste-meta .size,
.paste-meta .views {
    padding: 5px 10px;
    border-radius: 3px;
}

body.light-theme .paste-meta .syntax {
    background: #e0f7fa;
    color: #007bff;
}

body.dark-theme .paste-meta .syntax {
    background: #4a2c5e;
    color: #ff79c6;
}

body.light-theme .paste-meta .size {
    background: #e8f5e9;
    color: #2e7d32;
}

body.dark-theme .paste-meta .size {
    background: #2e4b3d;
    color: #50fa7b;
}

body.light-theme .paste-meta .views {
    background: #f3e5f5;
    color: #6a1b9a;
}

body.dark-theme .paste-meta .views {
    background: #3b2f47;
    color: #bd93f9;
}

/* Paste content styling */
.paste-content {
    margin: 10px 0;
    max-height: 600px;
    overflow-y: auto; /* Single scrollbar for the entire container */
    overflow-x: hidden; /* Prevent horizontal scroll on container */
    background: #f5f5f5; /* Background for light theme */
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex; /* Flex layout for side-by-side */
    align-items: stretch; /* Ensure children stretch to match height */
}

body.dark-theme .paste-content {
    background: #2d2d2d !important;
    border-color: #555 !important;
}

.paste-content pre {
    margin: 0;
    padding: 0px;
    white-space: pre; /* Preserve whitespace */
    overflow-x: auto; /* Horizontal scroll for code if needed */
    overflow-y: hidden; /* No separate vertical scroll */
    font-size: 14px;
    line-height: 1.6; /* Match with line numbers */
    background: none; /* Remove separate background */
    border: none; /* Remove separate border */
    text-align: left;
    flex: 1; /* Take remaining space */
}

.paste-content code {
    font-family: 'Courier New', Courier, monospace;
    background: none;
    padding: 0;
    margin: 0;
    display: block;
    line-height: 1.6; /* Match with line numbers */
    text-align: left;
    white-space: pre; /* Preserve whitespace */
}

/* Line numbers styling */
.paste-content .line-numbers {
    width: 40px;
    text-align: right;
    padding: 15px 5px 15px 15px; /* Match pre padding on left */
    background: #f0f0f0;
    border-right: 1px solid #ddd;
    font-size: 14px;
    line-height: 1.6; /* Match with code */
    color: #888;
    user-select: none;
    flex-shrink: 0; /* Prevent shrinking */
}

body.dark-theme .paste-content .line-numbers {
	background: #2d2d2d !important;
	border-right-color: #2d2d2d !important;
    color: #aaa !important;
}

.paste-content .line-numbers span {
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1.6; /* Match with code */
}

.paste-content:not(.with-line-numbers) .line-numbers {
    display: none;
}

.paste-content:not(.with-line-numbers) pre {
    padding-left: 15px;
}

/* Highlight.js theme overrides for better readability */
body.light-theme .hljs {
    background: transparent !important;
}

body.dark-theme .hljs {
    background: transparent !important;
}

/* Light theme adjustments */
body.light-theme .hljs-keyword,
body.light-theme .hljs-selector-tag,
body.light-theme .hljs-built_in {
    color: #d73a49; /* Bright red for keywords */
}

body.light-theme .hljs-string,
body.light-theme .hljs-regexp {
    color: #032f62; /* Dark blue for strings */
}

body.light-theme .hljs-number,
body.light-theme .hljs-literal {
    color: #005cc5; /* Blue for numbers */
}

body.light-theme .hljs-comment {
    color: #6a737d; /* Gray for comments */
}

body.light-theme .hljs-function,
body.light-theme .hljs-title {
    color: #6f42c1; /* Purple for functions */
}

/* Dark theme adjustments */
body.dark-theme .hljs-keyword,
body.dark-theme .hljs-selector-tag,
body.dark-theme .hljs-built_in {
    color: #ff79c6; /* Pink for keywords */
}

body.dark-theme .hljs-string,
body.dark-theme .hljs-regexp {
    color: #f1fa8c; /* Yellow for strings */
}

body.dark-theme .hljs-number,
body.dark-theme .hljs-literal {
    color: #bd93f9; /* Light purple for numbers */
}

body.dark-theme .hljs-comment {
    color: #6272a4; /* Light blue-gray for comments */
}

body.dark-theme .hljs-function,
body.dark-theme .hljs-title {
    color: #8be9fd; /* Cyan for functions */
}

/* Burn After Read Notice */
.burn-notice {
    background: #ffebee;
    color: #d32f2f;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

body.dark-theme .burn-notice {
    background: #4a2c2c !important;
    color: #ff6f6f !important;
}

/* Enhanced Success Message Styling */
.success {
    background: #e0f7fa;
    border: 2px solid #00d1ff;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.dark-theme .success {
    background: #4a2c5e !important;
    border-color: #ff00ff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5) !important;
}

.success p {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    margin: 0;
}

body.dark-theme .success p {
    color: #ff79c6 !important;
}

.success-link {
    display: inline-block;
    padding: 8px 16px;
    margin-left: 10px;
    background: #00d1ff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.success-link:hover {
    background: #3089ff;
}

body.dark-theme .success-link {
    background: #ff4081 !important;
}

body.dark-theme .success-link:hover {
    background: #d81b60 !important;
}

/* Popup Buttons */
.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.popup-buttons button {
    padding: 10px 20px;
    font-size: 14px;
    min-width: 80px;
}

/* Print stylesheet */
@media print {
    body * {
        visibility: hidden;
    }
    .paste-content, .paste-content * {
        visibility: visible;
    }
    .paste-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: none;
        border: none;
        padding: 0;
        margin: 0;
    }
    .paste-content pre {
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        white-space: pre;
        word-wrap: break-word;
    }
    .paste-content code {
        background: none;
        color: #000;
        font-family: 'Courier New', Courier, monospace;
    }
    .paste-content .line-numbers {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    button,
    .button {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    .footer,
    .additional-footer {
        padding: 10px;
    }

    .footer-links a,
    .additional-footer-links a {
        display: inline;
        margin: 0 5px;
    }

    .info-lightbox-content {
        width: 95%;
        padding: 15px;
    }

    .logo {
        max-width: 150px;
    }

    .logo-container {
        margin-top: 30px;
    }

    .options-container {
        flex-direction: column;
    }

    .option-group {
        flex: 1 1 100%;
    }

    .option-row {
        flex-direction: column;
    }

    .option-group.half-width {
        flex: 1 1 100%;
        margin: 5px 0;
    }

    .paste-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .paste-meta span {
        margin-bottom: 5px;
    }
}