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

/* Light mode (default) */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Dark mode */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

/* Navbar styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    transition: background-color 0.3s ease;
    min-height: 80px;
}

.navbar-left {
    display: flex;
    align-items: center;
}

body.dark-mode .navbar {
    background-color: #1e1e1e;
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05);
}

.nav-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    transition: color 0.3s ease;
}

body.dark-mode .nav-toggle {
    color: #e0e0e0;
}

.nav-toggle:hover {
    color: #007bff;
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    left: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    flex-direction: column;
    min-width: 200px;
    transition: background-color 0.3s ease;
}

body.dark-mode .dropdown-menu {
    background-color: #1e1e1e;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

.dropdown-menu.show {
    display: flex;
}

.menu-item {
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode .menu-item {
    color: #e0e0e0;
}

.menu-item:hover {
    background-color: #f5f5f5;
    color: #007bff;
}

body.dark-mode .menu-item:hover {
    background-color: #333;
}

.menu-item.active {
    background-color: #e6f0ff;
    color: #007bff;
    font-weight: bold;
}

body.dark-mode .menu-item.active {
    background-color: #252525;
}

.theme-toggle {
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

/* Tools container */
.tools-container {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    transition: background-color 0.3s ease;
    flex: 1;
}

body.dark-mode .tools-container {
    background-color: #1e1e1e;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.tool-container {
    display: none;
    width: 100%;
}

.tool-container.active {
    display: block;
}

/* HTML Checker Specific Styles */
.upload-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

body.dark-mode .upload-section {
    border-color: #444;
    background-color: #252525;
}

.content-type-selection {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.content-type-selection label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.content-type-selection input[type="radio"] {
    margin-right: 5px;
}

.save-indicator {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

body.dark-mode .save-indicator {
    color: #aaa;
}

.session-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 5px;
    border: 1px solid #ddd;
    text-align: center;
}

body.dark-mode .session-info {
    background-color: #333;
    border-color: #555;
}

.progress-bar {
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

body.dark-mode .progress-bar {
    background-color: #333;
}

#progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 20px;
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
}

body.dark-mode #progress-text {
    color: #e0e0e0;
}

.review-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    width: 100%;
}

.content-container {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.html-view, .preview {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    min-height: 400px;
    width: 49%;
}

.preview {
    background-color: white;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

body.dark-mode .preview {
    background-color: #252525;
}

#raw-html {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

body.dark-mode #raw-html {
    background-color: #1e1e1e;
    color: #d4d4d4;
    border: 1px solid #333;
}

/* Syntax highlighting */
#raw-html .link-highlight {
    color: #0066cc;
    font-weight: bold;
}

#raw-html .tag {
    color: #e83e8c;
    font-weight: bold;
}

#raw-html .attr-name {
    color: #6f42c1;
}

#raw-html .attr-value {
    color: #28a745;
}

#raw-html .comment {
    color: #6c757d;
    font-style: italic;
}

body.dark-mode #raw-html .link-highlight {
    color: #569cd6;
    font-weight: bold;
}

body.dark-mode #raw-html .tag {
    color: #f92672;
    font-weight: bold;
}

body.dark-mode #raw-html .attr-name {
    color: #a6e22e;
}

body.dark-mode #raw-html .attr-value {
    color: #e6db74;
}

body.dark-mode #raw-html .comment {
    color: #75715e;
    font-style: italic;
}

#html-preview {
    min-height: 500px;
    border: 1px solid #eee;
    padding: 15px;
    font-size: 16px;
    line-height: 1.5;
}

#html-preview iframe {
    width: 100%;
    height: 600px;
    border: 1px solid #eee;
    background-color: white;
    margin-top: 10px;
}

body.dark-mode #html-preview iframe {
    border-color: #444;
}

.iframe-error {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    border: 1px solid #ffeeba;
}

body.dark-mode .iframe-error {
    background-color: #332b00;
    color: #ffda6a;
    border-color: #665500;
}

.iframe-error a {
    color: #0066cc;
    text-decoration: underline;
}

body.dark-mode .iframe-error a {
    color: #4da3ff;
}

.preview-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.preview-controls .btn {
    background-color: #4CAF50;
    color: white;
    padding: 8px 15px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

.preview-controls .btn:hover {
    background-color: #45a049;
}

.preview-controls .btn:last-child {
    background-color: #2196F3;
}

.preview-controls .btn:last-child:hover {
    background-color: #0b7dda;
}

body.dark-mode .preview-controls .btn {
    background-color: #388e3c;
}

body.dark-mode .preview-controls .btn:hover {
    background-color: #2e7d32;
}

body.dark-mode .preview-controls .btn:last-child {
    background-color: #1976d2;
}

body.dark-mode .preview-controls .btn:last-child:hover {
    background-color: #1565c0;
}

.loading-message {
    padding: 30px;
    text-align: center;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.dark-mode .loading-message {
    color: #aaa;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.webpage-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
}

body.dark-mode .webpage-loading {
    background-color: rgba(20, 20, 20, 0.8);
}

.webpage-loading .loading-spinner {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

body.dark-mode .loading-spinner {
    border-color: #333;
    border-top-color: #3498db;
}

.loading-text {
    font-style: italic;
}

.loading-text small {
    display: block;
    margin-top: 8px;
    opacity: 0.7;
    font-size: 90%;
}

/* Website Viewer Styles */
.screenshot-viewer-ui {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 15px;
    background-color: #f9f9f9;
}

body.dark-mode .screenshot-viewer-ui {
    border-color: #444;
    background-color: #2a2a2a;
}

.url-bar {
    display: flex;
    flex-direction: column;
    background-color: #e9e9e9;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

body.dark-mode .url-bar {
    background-color: #333;
    border-color: #444;
}

.url-display {
    padding: 8px 10px;
    background-color: #fff;
    border-radius: 3px;
    font-size: 13px;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid #ddd;
    color: #333;
}

body.dark-mode .url-display {
    background-color: #222;
    border-color: #444;
    color: #ddd;
}

.screenshot-notice {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 6px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .screenshot-notice {
    color: #aaa;
}

.screenshot-icon {
    margin-right: 5px;
    font-size: 14px;
}

.screenshot-container {
    background-color: #fff;
    overflow-y: auto;
    max-height: 600px;
    position: relative;
    padding: 10px;
    text-align: center;
}

body.dark-mode .screenshot-container {
    background-color: #222;
}

.full-page-screenshot {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transform-origin: top center;
    transition: transform 0.2s ease;
}

body.dark-mode .full-page-screenshot {
    border-color: #333;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.zoom-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background-color: #f1f1f1;
    border-top: 1px solid #ddd;
}

body.dark-mode .zoom-controls {
    background-color: #333;
    border-color: #444;
}

.zoom-btn {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

body.dark-mode .zoom-btn {
    background-color: #444;
    border-color: #555;
    color: #eee;
}

.zoom-btn:hover {
    background-color: #f0f0f0;
}

body.dark-mode .zoom-btn:hover {
    background-color: #555;
}

.iframe-info {
    background-color: #e7f3fe;
    color: #0c5460;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #bee5eb;
}

body.dark-mode .iframe-info {
    background-color: #162c39;
    color: #8ed6f7;
    border-color: #204b61;
}

.primary-btn {
    background-color: #4CAF50 !important;
    color: white !important;
    font-weight: bold;
    padding: 12px 20px !important;
    font-size: 16px !important;
}

.primary-btn:hover {
    background-color: #45a049 !important;
}

body.dark-mode .primary-btn {
    background-color: #388e3c !important;
}

body.dark-mode .primary-btn:hover {
    background-color: #2e7d32 !important;
}

/* URL Preview Card Styles */
.url-info-container {
    margin-top: 20px;
}

.url-preview-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: #fff;
    margin-bottom: 20px;
}

body.dark-mode .url-preview-card {
    border-color: #444;
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.url-card-header {
    padding: 12px 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
}

body.dark-mode .url-card-header {
    background-color: #333;
    border-color: #444;
}

.url-icon {
    font-size: 20px;
    margin-right: 10px;
}

.url-domain {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

body.dark-mode .url-domain {
    color: #ddd;
}

.url-card-body {
    padding: 15px;
}

.url-full {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #eee;
    word-break: break-all;
    margin-bottom: 15px;
    font-family: monospace;
    color: #0066cc;
}

body.dark-mode .url-full {
    background-color: #222;
    border-color: #444;
    color: #4da3ff;
}

.url-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.url-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.url-btn:hover {
    background-color: #e9e9e9;
}

body.dark-mode .url-btn {
    background-color: #333;
    border-color: #444;
    color: #ddd;
}

body.dark-mode .url-btn:hover {
    background-color: #3a3a3a;
}

/* QR Code Styles */
.qr-code-container {
    margin: 15px 0;
}

.qr-code-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    text-align: center;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 300px;
    margin: 0 auto;
}

body.dark-mode .qr-code-card {
    border-color: #444;
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.qr-code-header {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 16px;
}

.qr-code-image {
    padding: 10px;
    background-color: #fff;
    display: inline-block;
    border-radius: 5px;
    margin-bottom: 15px;
}

.qr-image {
    display: block;
}

.qr-code-footer {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

body.dark-mode .qr-code-footer {
    color: #aaa;
}

/* Remote Browser Styles */
.remote-browser-ui {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark-mode .remote-browser-ui {
    border-color: #444;
    background-color: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.remote-browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

body.dark-mode .remote-browser-header {
    background-color: #2a2a2a;
    border-color: #444;
}

.browser-url {
    flex: 1;
    padding: 8px 12px;
    background-color: #fff;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 13px;
    font-family: system-ui, -apple-system, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0066cc;
}

body.dark-mode .browser-url {
    background-color: #333;
    border-color: #555;
    color: #4da3ff;
}

.browser-controls {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.browser-control-btn {
    background-color: transparent;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

.browser-control-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

body.dark-mode .browser-control-btn {
    color: #ddd;
}

body.dark-mode .browser-control-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.browser-content-area {
    min-height: 600px;
    position: relative;
    background-color: #f9f9f9;
}

body.dark-mode .browser-content-area {
    background-color: #252525;
}

.browser-screenshot {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border: none;
}

.browser-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    color: #666;
    font-size: 16px;
}

body.dark-mode .browser-loading {
    background-color: rgba(30, 30, 30, 0.9);
    color: #aaa;
}

.browser-preview-info {
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
}

body.dark-mode .browser-preview-info {
    background-color: #252525;
    border-color: #333;
    color: #aaa;
}

.url-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark-mode .url-card {
    border-color: #444;
    background-color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.url-card-header {
    background-color: #f8f8f8;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

body.dark-mode .url-card-header {
    background-color: #333;
    border-color: #444;
}

.url-card-header h3 {
    margin: 0;
    color: #333;
}

body.dark-mode .url-card-header h3 {
    color: #e0e0e0;
}

.url-card-body {
    padding: 20px;
}

.url-display {
    background-color: #f9f9f9;
    padding: 12px 15px;
    border-radius: 5px;
    border: 1px solid #eee;
    margin-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
}

body.dark-mode .url-display {
    background-color: #333;
    border-color: #444;
}

.url-label {
    font-weight: bold;
    margin-right: 10px;
    color: #333;
}

body.dark-mode .url-label {
    color: #ddd;
}

.url-value {
    color: #0066cc;
    font-family: monospace;
}

body.dark-mode .url-value {
    color: #4da3ff;
}

.url-note {
    background-color: #e7f3fe;
    color: #0c5460;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #bee5eb;
}

body.dark-mode .url-note {
    background-color: #162c39;
    color: #8ed6f7;
    border-color: #204b61;
}

.url-preview-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.url-controls-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.url-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.url-btn:hover {
    background-color: #e9e9e9;
}

body.dark-mode .url-btn {
    background-color: #333;
    border-color: #444;
    color: #ddd;
}

body.dark-mode .url-btn:hover {
    background-color: #3a3a3a;
}

/* Webpage Preview Styles */
.webpage-preview-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 750px; /* Further increase container height for full-width mode */
}

body.dark-mode .webpage-preview-container {
    border-color: #444;
    background-color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

body.dark-mode .preview-header {
    background-color: #333;
    border-color: #444;
}

.preview-url {
    flex: 1;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0066cc;
    font-size: 14px;
    padding-right: 15px;
}

.formatted-text-container {
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
    padding: 25px;
    font-size: 16px;
    line-height: 1.6;
    max-width: 100%;
    overflow-wrap: break-word;
}

body.dark-mode .formatted-text-container {
    background-color: #252525;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-mode .preview-url {
    color: #4da3ff;
}

.preview-controls {
    display: flex;
    gap: 10px;
}

.preview-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.preview-control-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

body.dark-mode .preview-control-btn {
    color: #ddd;
}

body.dark-mode .preview-control-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.preview-iframe-container {
    min-height: 600px;
    position: relative;
}

.preview-iframe {
    display: block;
    border: none;
    width: 100%;
    height: 100%;
}

.preview-error {
    padding: 25px;
    text-align: center;
    background-color: #fff3cd;
    color: #856404;
    margin: 20px;
    border-radius: 8px;
}

body.dark-mode .preview-error {
    background-color: #332b00;
    color: #ffda6a;
}

.error-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.error-detail {
    background-color: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
    font-size: 14px;
    text-align: left;
}

body.dark-mode .error-detail {
    background-color: rgba(0,0,0,0.2);
}

.error-options {
    text-align: left;
    margin: 15px 0;
}

.error-options ol {
    padding-left: 25px;
}

.preview-error .btn {
    margin-top: 15px;
}

/* Google Cache Viewer */
.cache-viewer-ui {
    display: flex;
    flex-direction: column;
}

.cache-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

body.dark-mode .cache-header {
    background-color: #333;
    border-color: #444;
}

.cache-url {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

body.dark-mode .cache-url {
    color: #ddd;
}

.cache-controls {
    display: flex;
    gap: 10px;
}

.cache-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.cache-control-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

body.dark-mode .cache-control-btn {
    color: #ddd;
}

body.dark-mode .cache-control-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.cache-iframe {
    border: none;
    width: 100%;
    min-height: 600px;
}

.cache-info {
    padding: 10px 15px;
    background-color: #e7f3fe;
    color: #0c5460;
    border-top: 1px solid #bee5eb;
    font-size: 12px;
}

body.dark-mode .cache-info {
    background-color: #162c39;
    color: #8ed6f7;
    border-color: #204b61;
}

.cache-error {
    padding: 25px;
    text-align: center;
    background-color: #fff3cd;
    color: #856404;
    margin: 20px;
    border-radius: 8px;
}

body.dark-mode .cache-error {
    background-color: #332b00;
    color: #ffda6a;
}

.error-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* QR Code viewer */
.qr-code-ui {
    padding: 20px;
    text-align: center;
}

.qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qr-header h3 {
    margin: 0;
    flex: 1;
    text-align: center;
}

.qr-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.qr-control-btn:hover {
    color: #f44336;
}

.qr-code-wrapper {
    background-color: #fff;
    padding: 15px;
    display: inline-block;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.qr-code-image {
    display: block;
}

.qr-info {
    color: #666;
    font-size: 14px;
}

body.dark-mode .qr-info {
    color: #aaa;
}

.actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 50px;
    padding: 15px 0;
    margin-bottom: 15px;
    width: 100%;
}

.approve, .disapprove {
    background-color: #4CAF50;
    color: white;
    width: 200px;
    text-align: center;
    font-weight: bold;
    padding: 12px 20px;
}

.approve:hover {
    background-color: #45a049;
}

.disapprove {
    background-color: #f44336;
}

.disapprove:hover {
    background-color: #da3c30;
}

#disapprove-notes {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    display: none;
    background-color: white;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode #disapprove-notes {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

.export {
    background-color: #2196F3;
    color: white;
    margin-bottom: 20px;
}

.export:hover {
    background-color: #0b7dda;
}

#results-table-container {
    overflow-x: auto;
}

#results-table {
    width: 100%;
    border-collapse: collapse;
}

#results-table th, 
#results-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode #results-table th,
body.dark-mode #results-table td {
    border-color: #555;
    color: #e0e0e0;
}

#results-table th {
    background-color: #f2f2f2;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode #results-table th {
    background-color: #333;
    color: #e0e0e0;
}

#results-table tr:nth-child(even) {
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

body.dark-mode #results-table tr:nth-child(even) {
    background-color: #2a2a2a;
}

.status-approved {
    color: #4CAF50;
    font-weight: bold;
}

.status-disapproved {
    color: #f44336;
    font-weight: bold;
}

/* Scrapier Specific Styles */
.scrapier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scrapier-header h1 {
    margin: 0;
    color: #2c3e50;
}

body.dark-mode .scrapier-header h1 {
    color: #e0e0e0;
}

.input-section {
    margin-bottom: 20px;
}

.input-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-section input[type="text"],
.input-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: white;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .input-section input[type="text"],
body.dark-mode .input-section textarea {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

.options-section {
    margin-bottom: 20px;
}

.options-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

body.dark-mode .options-section h3 {
    color: #e0e0e0;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #eee;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .option-item {
    background-color: #333;
    border-color: #444;
}

.option-item:hover {
    background-color: #f0f0f0;
    border-color: #ddd;
}

body.dark-mode .option-item:hover {
    background-color: #3a3a3a;
    border-color: #555;
}

.option-item input[type="checkbox"] {
    margin-right: 8px;
}

.action-button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.action-button:hover {
    background-color: #45a049;
}

.status-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .status-section {
    background-color: #333;
    border-color: #444;
}

.results-section {
    margin-top: 20px;
}

.results-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

body.dark-mode .results-section h3 {
    color: #e0e0e0;
}

.result-item {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .result-item {
    background-color: #333;
    border-color: #444;
}

.result-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

body.dark-mode .result-item h4 {
    color: #e0e0e0;
}

.result-value {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: white;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
    font-size: 14px;
    max-height: 200px;
    overflow-y: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .result-value {
    background-color: #1e1e1e;
    border-color: #333;
}

.hidden {
    display: none;
}

/* Footer styles */
.footer {
    width: 100%;
    padding: 20px 0;
    background: transparent;
    position: relative;
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 14px;
    color: #555;
    gap: 5px;
}

body.dark-mode .footer {
    color: #aaa;
    border-top-color: #333;
}

body.dark-mode .footer-content {
    color: #aaa;
}

.version {
    font-weight: bold;
    text-align: center;
    width: 100%;
}

.copyright {
    font-style: italic;
    text-align: center;
    width: 100%;
}

/* Responsive styles */
@media (max-width: 768px) {
    .content-container {
        flex-direction: column;
    }
    
    .html-view, .preview {
        width: 100%;
        margin-left: 0;
        margin-bottom: 15px;
    }
    
    .actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .approve, .disapprove {
        width: 100%;
    }
    
    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}