/* Custom CSS variables for the new theme */
:root {
    --color-primary: #6B8E23; /* Olive Green */
    --color-primary-dark: #55721C;
    --color-accent: #FFD700;   /* Gold/Yellow */
    --color-accent-dark: #E0B800;
    --color-text-dark: #333333;
    --color-text-light: #666666;
    --color-background-light: #F8F8F8;
    --color-background-card: #FFFFFF;
    --color-border: #D1D5DB;
}

body {
    font-family: 'Inter', sans-serif; /* Reverted to Inter as per the original request for body font */
    background-color: var(--color-background-light);
    color: var(--color-text-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', sans-serif; /* Headings use Open Sans for a professional contrast */
}

/* Custom styles for drag and drop area */
.drag-area {
    border: 2px dashed var(--color-border);
    background-color: #f0f4e8; /* Lighter olive tint */
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0.75rem; /* More rounded */
}
.drag-area.active {
    border-color: var(--color-primary);
    background-color: #e6f0d0; /* Even lighter olive tint */
}
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-background-card);
    min-height: 150px;
    align-items: flex-start;
    border-radius: 0.75rem; /* More rounded */
}
.image-item {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9fafb;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
}
.image-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.image-item .remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: rgba(239, 68, 68, 0.8); /* Red with transparency */
    color: white;
    border-radius: 50%;
    width: 24px; /* Slightly larger */
    height: 24px; /* Slightly larger */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem; /* Slightly larger icon */
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease;
}
.image-item .remove-btn:hover {
    background-color: rgba(239, 68, 68, 1); /* Solid red on hover */
}
.image-item .file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.6rem;
    padding: 0.2rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdf-preview-iframe {
    width: 100%;
    height: 500px;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem; /* More rounded */
    background-color: var(--color-background-card);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly darker overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    font-size: 1.5rem;
    flex-direction: column;
}
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--color-accent); /* Yellow spinner */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.message-box {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: var(--color-primary); /* Olive for success */
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: none; /* Hidden by default */
}
.message-box.error {
    background-color: #f44336; /* Red for error */
}

/* Custom button styles with gradients and shadows */
.btn-primary {
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark));
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 9999px; /* Full rounded */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(to right, var(--color-primary-dark), var(--color-primary));
}

.btn-secondary {
    background-color: #6B7280; /* Gray for clear all */
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    background-color: #4B5563;
}

.btn-accent {
    background: linear-gradient(to right, var(--color-accent), var(--color-accent-dark));
    color: var(--color-text-dark); /* Dark text on yellow */
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(to right, var(--color-accent-dark), var(--color-accent));
}

/* Animation for icons */
.animated-icon:hover {
    animation: bounce 0.6s ease-in-out;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* AdSense Placeholder Styling */
.adsense-placeholder {
    background-color: #FFFBEB; /* Light yellow background */
    border: 1px dashed #FCD34D; /* Yellow dashed border */
    padding: 1.5rem;
    text-align: center;
    color: #D97706; /* Darker yellow text */
    font-weight: 500;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

/* Converted Image Preview Container */
.converted-image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-background-card);
    min-height: 100px;
    align-items: flex-start;
    border-radius: 0.75rem;
}
.converted-image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px; /* Slightly larger preview for converted images */
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #f9fafb;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding-bottom: 0.5rem; /* Space for button */
}
.converted-image-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}
.converted-image-item .download-single-btn {
    background-color: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}
.converted-image-item .download-single-btn:hover {
    background-color: var(--color-primary-dark);
}
