:root {
    --primary-color: #006837;
    --secondary-color: #008542;
    --background-light: #ffffff;
    --text-light: #1f2937;
    --border-light: #e5e7eb;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --header-height: 70px;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

[data-theme="dark"] {
    --primary-color: #008542;
    --secondary-color: #00a651;
    --background-light: #1f2937;
    --text-light: #f3f4f6;
    --border-light: #374151;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-light);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-light);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.header-content > div {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Side Menu */
.side-menu {
    position: fixed;
    right: -100%;
    top: 0;
    width: 300px;
    height: 100vh;
    background-color: var(--background-light);
    box-shadow: var(--shadow-light);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding: calc(var(--header-height) + 1rem) 1rem 1rem 1rem;
    border-left: 3px solid var(--primary-color);
}

.side-menu.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.menu-header h3 {
    color: var(--primary-color);
    font-weight: 700;
}

.menu-items {
    list-style: none;
}

.menu-item {
    margin-bottom: 1rem;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    position: relative;
}

.menu-link:hover, .menu-link.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(-5px);
}

.menu-link i {
    margin-left: 0.75rem;
    width: 20px;
    text-align: center;
}

.submenu {
    list-style: none;
    margin-right: 2rem;
    margin-top: 0.5rem;
    display: none;
    background-color: var(--border-light);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
}

.submenu.active {
    display: block;
}

.submenu .menu-link {
    margin: 0.25rem;
    font-size: 0.9rem;
}

.menu-close {
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.menu-close:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    color: white;
    box-shadow: var(--shadow-light);
    display: none;
}


.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Input Section */
.input-section {
    background: var(--background-light);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.input-header label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 1.1rem;
}

.input-tools {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tool-btn {
    background: var(--border-light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--text-light);
}

.tool-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    min-height: 150px;
    transition: border-color 0.3s ease;
    background: var(--background-light);
    color: var(--text-light);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 104, 55, 0.1);
}

.input-actions {
    display: flex;   
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: nowrap;
    flex-direction: row;
}



.primary-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 104, 55, 0.3);
}

.secondary-btn {
    background: var(--border-light);
    color: var(--text-light);
    border: 2px solid var(--border-light);
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Search Tools */
.search-tools {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

.search-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 2rem;
    font-size: 1rem;
    background: var(--background-light);
    color: var(--text-light);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar button {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 45px;
    height: 45px;
}

.search-bar button:hover {
    background-color: #c82333;
    transform: scale(1.1);
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-options select {
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 0.5rem;
    background: var(--background-light);
    color: var(--text-light);
    cursor: pointer;
    flex: 1;
    min-width: 150px;
}

.filter-options select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Control Buttons */
.control-buttons {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

.main-controls {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.selection-controls, .action-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ctrl-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    white-space: nowrap;
}

.select-btn {
    background: var(--success-color);
    color: white;
}

.deselect-btn {
    background: var(--border-light);
    color: var(--text-light);
}

.copy-btn {
    background: var(--info-color);
    color: white;
}

.download-btn {
    background: var(--warning-color);
    color: #212529;
}

.delete-btn {
    background: var(--danger-color);
    color: white;
}

.ctrl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image Stats */
.image-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    background: var(--background-light);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.stats-label {
    color: var(--primary-color);
}

/* Results Grid */
.results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.image-card {
    background: var(--background-light);
    border-radius: 1rem;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-light);
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-context-menu: none;
}

.image-wrapper img:hover {
    transform: scale(1.05);
}

.checkbox-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 5px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.image-info {
    padding: 1rem;
}

.image-alt {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.image-alt span {
    flex: 1;
    word-break: break-word;
}

.edit-alt-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.edit-alt-btn:hover {
    background: var(--border-light);
}

.image-dimensions {
    background: var(--border-light);
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: inline-block;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.action-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 36px;
}

.copy-link-btn {
    background: var(--info-color);
    color: white;
}

.copy-embed-btn {
    background: var(--success-color);
    color: white;
}

.preview-btn {
    background: #6f42c1;
    color: white;
}

.delete-image-btn {
    background: var(--danger-color);
    color: white;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.url-display {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-light);
    word-break: break-all;
    border: 1px solid var(--border-light);
    max-height: 60px;
    overflow-y: auto;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--background-light);
    margin: 5% auto;
    padding: 0;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 1.5rem;
}

.copy-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.copy-option:last-child {
    margin-bottom: 0;
}

.copy-option:hover {
    border-color: var(--primary-color);
    background: rgba(0, 104, 55, 0.05);
    transform: translateX(-3px);
}

.copy-option i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.option-details h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-light);
    font-size: 1rem;
}

.option-details p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-light);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--background-light);
    color: var(--text-light);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Preview Modal */
.preview-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.preview-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: var(--background-light);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.preview-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.preview-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.close-preview {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.close-preview:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.preview-image-container {
    position: relative;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 60vh;
    overflow: auto;
    flex: 1;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-context-menu: none;
}

.preview-info {
    padding: 1.5rem;
    background: var(--background-light);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    max-height: 30vh;
    overflow-y: auto;
}

.preview-dimensions {
    background: var(--border-light);
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: inline-block;
}

.preview-url {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-light);
    word-break: break-all;
    border: 1px solid var(--border-light);
    max-height: 80px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.preview-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Notifications */
.notification {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-light);
    transform: translateX(120%);
    transition: all 0.3s ease;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 350px;
    word-wrap: break-word;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--warning-color);
    color: #212529;
}

.notification.info {
    background: var(--info-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
    margin-top: auto;
    font-weight: 500;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .container {
        padding: 1rem 0.75rem;
    }

    .page-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        display: none;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-description {
        font-size: 1rem;
    }

    .header-title {
        font-size: 0.9rem;
    }

    .input-section {
        padding: 1.5rem;
    }

    .input-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .input-tools {
        width: 100%;
        justify-content: flex-start;
    }

    .tool-btn {
        flex: 1;
        text-align: center;
        min-width: 100px;
    }

    .input-actions {
       
        align-items: stretch;
    }

    .primary-btn, .secondary-btn {
        width: 100%;
        justify-content: center;
    }

    .search-filters {
        flex-direction: column;
    }

    .filter-options {
        flex-direction: column;
    }

    .filter-options select {
        width: 100%;
    }

    .main-controls {
        flex-direction: column;
        gap: 1rem;
    }

    /* Mobile Control Buttons - Horizontal Scrollable */
    .selection-controls, .action-controls {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.5rem 0;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .selection-controls::-webkit-scrollbar,
    .action-controls::-webkit-scrollbar {
        height: 4px;
    }

    .selection-controls::-webkit-scrollbar-track,
    .action-controls::-webkit-scrollbar-track {
        background: var(--border-light);
        border-radius: 2px;
    }

    .selection-controls::-webkit-scrollbar-thumb,
    .action-controls::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }

    .ctrl-btn {
        flex-shrink: 0;
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: auto;
        white-space: nowrap;
    }

    .ctrl-btn .btn-text {
        display: none;
    }

    .ctrl-btn i {
        margin: 0;
    }

    .image-stats {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* Mobile Grid - Two columns for images */
    .results {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .image-card {
        border-radius: 0.75rem;
    }

    .image-wrapper {
        height: 150px;
    }

    .image-info {
        padding: 0.75rem;
    }

    .image-alt {
        font-size: 0.8rem;
        padding: 0.4rem;
    }

    .image-dimensions {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .button-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
    }

    .action-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
        gap: 0.2rem;
    }

    .action-btn i {
        font-size: 0.8rem;
    }

    .url-display {
        font-size: 0.65rem;
        padding: 0.4rem;
        max-height: 40px;
    }

    .side-menu {
        width: 85%;
        max-width: 300px;
    }

    .preview-content {
        max-width: 95%;
        max-height: 95%;
        margin: 10px;
    }

    .preview-image-container {
        max-height: 50vh;
    }

    .preview-info {
        max-height: 40vh;
        padding: 1rem;
    }

    .preview-actions {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 2.5% auto;
    }

    .copy-option {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .form-actions {
        flex-direction: column;
    }


    .notification.success {
        display: none;
    }
    
   
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-120%);
        margin-top: 1rem;
    }

    .notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .results {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .image-wrapper {
        height: 120px;
    }

    .image-info {
        padding: 0.5rem;
    }

    .button-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .action-btn {
        flex: 1;
        min-width: calc(50% - 0.125rem);
        padding: 0.35rem 0.4rem;
        font-size: 0.65rem;
    }

    .ctrl-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-height: 32px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .header-title {
        font-size: 0.8rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .results {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }

    .image-wrapper {
        height: 100px;
    }

    .action-btn {
        font-size: 0.6rem;
        padding: 0.3rem;
    }

    .header-title {
        display: none;
    }

    .tool-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Print Styles */
@media print {
    .side-menu, 
    .control-buttons, 
    .search-tools,
    header,
    footer,
    .notification,
    .modal {
        display: none !important;
    }

    body {
        padding-top: 0;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .image-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .results {
        grid-template-columns: repeat(4, 1fr);
    }
}