/* Light Theme Variables */
:root[data-theme="light"] {
    --dark-grey: #2c2c2c;
    --light-grey: #f8f8f8;
    --black: #000000;
    --white: #ffffff;
    --bg-color: #eb6c6e;
    --card-bg: #ffffff;
    --text-color: #2c2c2c;
    --border-color: #000000;
    --box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 1);
    --hover-box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 1);
    --input-bg: #ffffff;
    --input-text: #2c2c2c;
    --input-placeholder: rgba(44, 44, 44, 0.5);
}

/* Dark Theme Variables (default) */
:root[data-theme="dark"] {
    --dark-grey: #1a1a1a;
    --light-grey: #2c2c2c;
    --black: #000000;
    --white: #ffffff;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #ffffff;
    --border-color: #333333;
    --box-shadow: 4px 4px 0 0 rgba(255, 88, 90, 0.3);
    --hover-box-shadow: 6px 6px 0 0 rgba(255, 88, 90, 0.4);
    --input-bg: #2c2c2c;
    --input-text: #ffffff;
    --input-placeholder: rgba(255, 255, 255, 0.5);
    --table-stripe: #2a2a2a;
    --table-hover: rgba(255, 88, 90, 0.2);
}

/* Common Variables */
:root {
    --header-font-size: 40px;
    --transition-duration: 0.3s;
    --primary-color: #ff585a;
    --border-radius: 12px;
    --font-family: 'Poppins', sans-serif;
}

/* Theme transition */
body * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Theme toggle button styles */
.theme-toggle {
    cursor: pointer;
    padding: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    background: none;
    color: var(--text-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle__horizon {
    width: 24px;
    height: 24px;
    color: var(--text-color);
}

.theme-toggle-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    background: var(--bg-color);
    background-image: linear-gradient(135deg, var(--bg-color), var(--bg-color));
    box-sizing: border-box;
    padding: 25px;
    margin: 0;
    min-height: 100vh;
    overflow-y: auto;
    font-family: var(--font-family);
    color: var(--text-color);
}

.header {
    text-align: center;
    margin-bottom: 30px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    box-shadow: var(--box-shadow);
    padding: 20px;
    animation: slideInFromTop 0.5s ease-out;
}

.header h1 {
    margin: 0;
    font-size: var(--header-font-size);
    color: var(--text-color);
}

.controls-section {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--box-shadow);
}

.controls-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding-right: 15px;
}

.left-inputs {
    display: flex;
    gap: 15px;
    flex: 4;
    align-items: flex-start;
}

.right-inputs {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex: 1;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.input-field {
    display: flex;
    flex-direction: column;
}

.input-field label {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-color);
}

.input-field input[type="text"],
.input-field input[type="number"],
.input-field select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    transition: all 0.2s ease;
    box-shadow: var(--box-shadow);
    background: var(--input-bg);
    color: var(--input-text);
}

.input-field input[type="text"]::placeholder,
.input-field input[type="number"]::placeholder {
    color: var(--input-placeholder);
}

.input-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.input-field input#pages {
    background: var(--input-bg) !important;
    color: var(--input-text) !important;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px;
    font-family: var(--font-family);
    transition: all 0.2s ease;
    box-shadow: var(--box-shadow);
}

.checkbox-field {
    margin-top: 28px;
    white-space: nowrap;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-color);
}

.checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--dark-grey);
    position: relative;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
}

.checkbox-field input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    border-color: var(--black);
}

.checkbox-field input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-field input[type="checkbox"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    color: var(--white);
    border: 2px solid var(--black);
    border-radius: var(--border-radius);
    padding: 12px 24px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: var(--box-shadow);
    flex: 1;
    min-width: 150px;
    text-align: center;
    white-space: nowrap;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
    background: linear-gradient(135deg, #e64142, #cc3a3b);
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

.progress {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    box-shadow: var(--box-shadow);
    margin: 20px 0;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    color: var(--text-color);
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), #e64142);
    transition: width 0.3s ease;
}

.results-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    box-shadow: var(--box-shadow);
    min-height: 400px;
}

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

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-button {
    padding: 12px 24px;
    border: 2px solid var(--black);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    justify-content: center;
}

.export-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.copy-button { background: linear-gradient(135deg, #2196F3, #1976D2); color: var(--white); }
.csv-button { background: linear-gradient(135deg, #4CAF50, #388E3C); color: var(--white); }
.excel-button { background: linear-gradient(135deg, #217346, #1B5E3A); color: var(--white); }

.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    box-shadow: var(--box-shadow);
    margin-top: 20px;
    background: var(--card-bg);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    table-layout: fixed;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color);
}

th {
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    color: var(--white);
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--border-color);
}

td {
    background-color: var(--card-bg);
    color: var(--text-color) !important;
    transition: all 0.2s ease;
}

tr:nth-child(even) td {
    background-color: var(--table-stripe);
    color: var(--text-color) !important;
}

tr:hover td {
    background-color: var(--table-hover);
    color: var(--text-color) !important;
}

td:hover {
    overflow: visible;
    white-space: normal;
    background: var(--card-bg) !important;
    position: relative;
    z-index: 1;
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(255, 88, 90, 0.2);
    border-radius: 4px;
    color: var(--text-color) !important;
}

/* Specific column widths */
th:nth-child(1), td:nth-child(1) { width: 100px; } /* Keyword */
th:nth-child(2), td:nth-child(2) { width: 100px; } /* Name */
th:nth-child(3), td:nth-child(3) { width: 50px; } /* Rating */
th:nth-child(4), td:nth-child(4) { width: 50px; } /* Reviews */
th:nth-child(5), td:nth-child(5) { width: 100px; } /* Category */
th:nth-child(6), td:nth-child(6) { width: 100px; } /* Years */
th:nth-child(7), td:nth-child(7) { width: 100px; } /* Location */
th:nth-child(8), td:nth-child(8) { width: 100px; } /* Services */
th:nth-child(9), td:nth-child(9) { width: 100px; } /* Phone */
th:nth-child(10), td:nth-child(10) { width: 100px; } /* Website */
th:nth-child(11), td:nth-child(11) { width: 100px; } /* Address */
th:nth-child(12), td:nth-child(12) { width: 100px; } /* Directions */
th:nth-child(13), td:nth-child(13) { width: 100px; } /* Email 1 */
th:nth-child(14), td:nth-child(14) { width: 100px; } /* Email 2 */
th:nth-child(15), td:nth-child(15) { width: 100px; } /* Facebook */
th:nth-child(16), td:nth-child(16) { width: 100px; } /* Instagram */
th:nth-child(17), td:nth-child(17) { width: 100px; } /* LinkedIn */
th:nth-child(18), td:nth-child(18) { width: 100px; } /* YouTube */
th:nth-child(19), td:nth-child(19) { width: 100px; } /* TikTok */

/* Scrollbar styles */
.table-container::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
    border: 3px solid #f1f1f1;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #e64142;
}

.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    border: 2px solid var(--black);
    box-shadow: var(--box-shadow);
    color: var(--white);
    font-family: var(--font-family);
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), #e64142);
}

.alert.show {
    opacity: 1;
    transform: translateX(0);
}

/* Remove individual alert type styles since we want them all to match */
.alert-success,
.alert-error,
.alert-info {
    background: linear-gradient(135deg, var(--primary-color), #e64142);
}

@keyframes slideInFromTop {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .input-group {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
        width: 100%;
    }

    .button-primary,
    .export-button {
        width: 100%;
    }
}

/* Cursor Effect */
.cursor {
    pointer-events: none;
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    z-index: 9999;
    mix-blend-mode: difference;
}

.circle {
    pointer-events: none;
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.2s;
    z-index: 9999;
    mix-blend-mode: difference;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.video-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.video-modal-content {
    position: relative;
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    box-shadow: var(--box-shadow);
    transform: scale(0.7);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 70%;
    max-width: 900px;
}

.video-modal.show .video-modal-content {
    transform: scale(1);
}

.video-close {
    position: absolute;
    right: -15px;
    top: -15px;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    color: var(--white);
    border: 2px solid var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
    z-index: 2;
}

.video-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: linear-gradient(135deg, #e64142, #cc3a3b);
    box-shadow: var(--hover-box-shadow);
}

#tutorial-video {
    width: 100%;
    height: 480px;
    border-radius: var(--border-radius);
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: var(--black);
}

/* Header Links */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 50px;
    margin-right: 15px;
    transition: all 0.3s ease;
    border: 2px solid var(--black);
    border-radius: 50%;
    padding: 3px;
    background: var(--white);
    box-shadow: var(--box-shadow);
}

.logo:hover {
    transform: rotate(360deg) scale(1.1);
    box-shadow: var(--hover-box-shadow);
}

.link-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

.link-container h4 {
    margin: 0;
}

.author-link,
.icon-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid var(--black);
    border-radius: 50%;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
    cursor: pointer;
}

.author-link img,
.icon-link img {
    width: 24px;
    height: 24px;
}

.author-link:hover,
.icon-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-box-shadow);
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: var(--black);
    color: var(--white);
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Update header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 15px 25px;
}

.stats-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stats-info p {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
    margin: 0;
    color: var(--text-color);
}

.stats-info strong {
    display: block;
    color: var(--text-color) !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stats-info span {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color) !important;
    line-height: 1.2;
}

.stats-info p:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.status-text {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.status-text.error {
    background-color: #ffe0e0;
    color: #d32f2f;
}

.status-text.success {
    background-color: rgba(255, 88, 90, 0.1);
    color: var(--primary-color);
}

.status-text.info {
    background-color: rgba(255, 88, 90, 0.1);
    color: var(--primary-color);
}

.status-text.warning {
    background-color: #fff8e0;
    color: #ef6c00;
}

/* Style for persistent notification */
.status-text.persistent {
    display: block;
    border-left: 4px solid var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.go-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 35px !important;
    min-width: unset !important;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    color: var(--white);
    border: 2px solid var(--black);
    border-radius: var(--border-radius);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
    z-index: 999;
    padding: 0;
    flex: none !important;
}

.go-to-top.show {
    display: flex;
}

.go-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
    background: linear-gradient(135deg, #e64142, #cc3a3b);
}

.go-to-top svg {
    width: 18px;
    height: 30px;
    fill: var(--white);
}

.small-text {
    font-size: 1.7em !important;
    opacity: 0.85;
    color: var(--text-color) !important;
}

/* License Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10vh auto;
    padding: 25px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 600px;
    border: 2px solid var(--border-color);
    box-shadow: var(--box-shadow);
    position: relative;
    color: var(--text-color);
    animation: slideInFromTop 0.3s ease-out;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    color: var(--text-color);
    font-size: 24px;
}

.close {
    position: absolute;
    right: -15px;
    top: -15px;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    color: var(--white);
    border: 2px solid var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
}

.close:hover {
    transform: scale(1.1) rotate(90deg);
    background: linear-gradient(135deg, #e64142, #cc3a3b);
    box-shadow: var(--hover-box-shadow);
}

.license-input {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.license-input input {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
    background: var(--input-bg);
    color: var(--input-text);
}

.license-input input:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.license-buttons {
    display: flex;
    gap: 10px;
}

.license-input button {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    color: var(--white);
    border: 2px solid var(--black);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
    min-width: unset;
}

.license-input button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
    background: linear-gradient(135deg, #e64142, #cc3a3b);
}

.license-input button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.license-input button.active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.license-input button.active:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

#licenseStatus {
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
    border: 2px solid var(--border-color);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--card-bg);
    color: var(--text-color);
}

#licenseStatus.status-inactive {
    background: var(--card-bg);
    color: var(--text-color);
}

#licenseStatus.status-active {
    background: var(--card-bg);
    color: var(--text-color);
}

#licenseStatus.status-lifetime {
    background: var(--card-bg);
    color: var(--text-color);
}

#licenseStatus.status-warning {
    color: #ff9800;
    background: var(--card-bg);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Disabled button styles */
button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 24px;
}

.modal-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 1.2em;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;
}

button.scraping {
    background: linear-gradient(135deg, #e64142, #cc3a3b) !important;
    animation: pulse 2s infinite;
    &:hover {
        background: linear-gradient(135deg, #cc3a3b, #b53435) !important;
    }
}

.alert-button.support {
    background: #2c2c2c;
    color: white;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    &:hover {
        background: #1a1a1a;
    }
}

.alert-button.purchase {
    background: linear-gradient(135deg, #ff585a, #e64142);
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    &:hover {
        background: linear-gradient(135deg, #e64142, #cc3a3b);
    }
}

.purchase-note {
    color: #333;
    font-size: 14px;
    margin: 15px 0;
    text-align: center;
}

.email-note a {
    color: #ff585a;
    text-decoration: none;
    font-weight: bold;
    &:hover {
        text-decoration: underline;
    }
}

.pro-badge {
    background: linear-gradient(135deg, #ff585a, #e64142);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    border: 2px solid var(--black);
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-duration);
    cursor: default;
}

.pro-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.license-note {
    margin-top: 20px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.license-note p {
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
}

.country-select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--input-bg);
    color: var(--input-text);
    font-family: var(--font-family);
    cursor: pointer;
}

/* Dark mode adjustments automatically handled by CSS variables */

/* Make Number of Pages and Batch Size inputs narrower */
#pages, #batchSize {
    width: 80px !important;
}

/* Add container classes to the HTML elements for better targeting */
.input-field-small {
    margin-left: 10px;
    width: auto !important;
    min-width: 120px !important;
}

/* Alternate solution for browsers not supporting :has */
@supports not (selector(:has(*))) {
    .input-field label[for="pages"] + input,
    .input-field label[for="batchSize"] + input {
        width: 100px !important;
        display: inline-block;
    }
}

/* Keywords field should be wider */
.keyword-field {
    flex: 2.5;
    min-width: 280px;
    margin-right: 20px;
}

/* Country field should be medium width */
.country-field {
    flex: 0.9;
    min-width: 170px;
    margin-left: 0;
}

/* Pages and batch fields - add more spacing to shift right */
.pages-field, .batch-field {
    margin-left: 20px;
    width: auto !important;
    min-width: 120px !important;
}

/* Remove these selectors as we now have specific classes */
.input-field:first-child,
.input-field:nth-child(2) {
    margin-left: 0;
}

.input-field-small {
    width: auto !important;
    min-width: 120px !important;
}

/* Settings button styles */
.settings-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 10px;
    font-weight: bold;
    min-width: 150px;
    text-align: center;
}

.settings-button:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.settings-button svg {
    flex-shrink: 0;
}

.settings-button.scraping {
    background: linear-gradient(135deg, #e64142, #cc3a3b) !important;
    animation: pulse 2s infinite;
}

.settings-button.scraping:hover {
    background: linear-gradient(135deg, #cc3a3b, #b53435) !important;
}

/* Settings modal styles */
.settings-section {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 18px;
}

.setting-field {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.setting-field input[type="number"] {
    width: 70px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--input-bg);
    color: var(--input-text);
}

.setting-field select {
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--input-bg);
    color: var(--input-text);
}

.settings-section .checkbox-field {
    margin-top: 0;
    margin-bottom: 15px;
}

.settings-section .checkbox-field label {
    font-weight: bold;
    cursor: pointer;
    color: var(--text-color);
}

.settings-section .checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--dark-grey);
    position: relative;
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease;
}

.settings-section .checkbox-field input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    border-color: var(--black);
}

.settings-section .checkbox-field input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.settings-section .checkbox-field input[type="checkbox"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-box-shadow);
}

.setting-note {
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-color);
    font-style: italic;
}

.settings-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.settings-buttons button {
    background: linear-gradient(135deg, var(--primary-color), #e64142);
    color: white;
    border: 2px solid var(--black);
    padding: 8px 16px;
    cursor: pointer;
    box-shadow: var(--box-shadow);
}

/* Settings text color fix */
.settings-section h3,
.setting-field label,
.setting-note p,
.modal-header h2 {
    color: var(--text-color);
}

/* Ensure modal text uses the theme colors */
.modal-content,
.modal-content * {
    color: var(--text-color);
}

/* Custom filename input styling */
#autoSaveFilename {
    color: var(--text-color);
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
}

/* Fix icon background in dark mode */
.logo, .icon-link img, .author-link img {
    background-color: transparent;
    border-radius: 50%;
}

/* Apply theme-based styling to all images in the header */
html[data-theme="dark"] .header img {
    background-color: transparent;
    border-radius: 50%;
}

/* Specifically target the logo and icons in dark mode */
html[data-theme="dark"] .logo,
html[data-theme="dark"] .icon-link img, 
html[data-theme="dark"] .author-link img {
    filter: brightness(0.9);
    background-color: transparent;
}

/* Fix background color for links in dark mode */
html[data-theme="dark"] .author-link,
html[data-theme="dark"] .icon-link {
    background-color: transparent;
    border: 2px solid var(--border-color);
}

/* Ensure all icons in header are transparent in dark mode */
html[data-theme="dark"] .header img,
html[data-theme="dark"] .author-link img,
html[data-theme="dark"] .icon-link img {
    background-color: transparent;
}

/* How-to-use modal styles */
.howto-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: thin;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 5px 5px 0 5px;
}

.howto-tab {
    background: transparent;
    border: none;
    padding: 10px 15px;
    margin-right: 5px;
    cursor: pointer;
    color: var(--text-color);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 600;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.howto-tab:hover {
    background-color: rgba(255, 88, 90, 0.1);
}

.howto-tab.active {
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    background-color: var(--card-bg);
}

html[data-theme="light"] .howto-tab.active {
    background-color: var(--card-bg);
    box-shadow: 0 -3px 8px rgba(0,0,0,0.05);
}

.howto-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.howto-content.active {
    display: block;
}

.howto-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.howto-section h4 {
    margin-top: 0;
    color: var(--text-color);
}

.howto-section p, .howto-section li {
    margin: 10px 0;
    color: var(--text-color);
}

.howto-section ul, .howto-section ol {
    padding-left: 20px;
}

.howto-section code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    color: var(--primary-color);
}

html[data-theme="light"] .howto-section {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Icon styles for How-to-use modal */
.howto-section .fas {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    margin-right: 5px;
}

.howto-section .fa-check {
    color: #4CAF50;
}

.howto-section .fa-exclamation-triangle {
    color: #FFC107;
}

.howto-section .fa-angle-right {
    color: var(--primary-color);
}

/* Ensure proper icon sizing and alignment */
.howto-section p strong i {
    display: inline-block;
    vertical-align: middle;
    font-size: 14px;
}

/* Product cards */
.product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
}

.product-card h4 {
    margin: 10px 0;
    color: var(--text-color);
}

.product-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.product-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff585a, #e64142);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.product-button:hover {
    background: linear-gradient(135deg, #e64142, #cc3a3b);
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .product-cards {
        grid-template-columns: 1fr;
    }
    
    .howto-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

/* Dark mode adjustments */
html[data-theme="dark"] .howto-section {
    background-color: var(--dark-card-bg);
}

html[data-theme="dark"] .product-card {
    background-color: var(--dark-card-bg);
}

html[data-theme="dark"] .howto-section code {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal light mode enhancements */
html[data-theme="light"] .modal-content {
    background-color: #f8f8f8;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

html[data-theme="light"] .modal-header h2 {
    color: #2c2c2c;
    font-weight: 700;
}

html[data-theme="light"] .howto-content {
    background-color: #f8f8f8;
}

html[data-theme="light"] .howto-content h3 {
    color: #333;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Improve tab styling in light mode */
html[data-theme="light"] .howto-tabs {
    background-color: #eee;
    border-bottom: 1px solid #ddd;
}

html[data-theme="light"] .howto-tab {
    color: #555;
}

html[data-theme="light"] .howto-tab:hover {
    background-color: rgba(255, 88, 90, 0.1);
    color: #222;
}

html[data-theme="light"] .howto-tab.active {
    background-color: #f8f8f8;
    color: #ff585a;
    font-weight: 700;
}

html[data-theme="light"] .howto-section code {
    background-color: rgba(0, 0, 0, 0.05);
    color: #e64142;
}

/* Product cards - light mode optimization */
html[data-theme="light"] .product-card {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

html[data-theme="light"] .product-card:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

html[data-theme="light"] .product-card p {
    color: #666666;
}

/* Toolbar container */
.toolbar-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* Confirmation Modal Styles */
.confirmation-modal {
    max-width: 450px;
}

.confirmation-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.confirmation-note {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

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

.cancel-button {
    background-color: var(--light-grey);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.cancel-button:hover {
    background-color: #e0e0e0;
}

.confirm-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.confirm-button:hover {
    background-color: #e64142;
}







