/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #1C2526;
    --text-color: #FFFFFF;
    --text-secondary: #D3D3D3;
    --accent-color: #FFD700;
    --error-color: #FF0000;
    --border-color: #A9A9A9;
    --hover-color: #808080;
    --header-bg: #000000;
    --footer-bg: #000000;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Header Styles */
.main-header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), background 0.3s cubic-bezier(0.4,0,0.2,1);
}

.main-header.scrolled {
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    background: #111;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 72px;
}

.logo img {
    height: 80px;
    width: auto;
    display: block;
    background: transparent;
    opacity: 0;
    transform: translateX(-30px);
    animation: logoFadeIn 1s cubic-bezier(0.4,0,0.2,1) 0.2s forwards;
}

@keyframes logoFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s cubic-bezier(0.4,0,0.2,1);
    padding: 0.5rem 0.2rem;
}

.main-nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
    position: absolute;
    left: 0;
    bottom: 0;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--header-bg);
    min-width: 200px;
    padding: 1rem 0;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0.5rem 1rem;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 0;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Tool Description */
.tool-description {
    margin-top: 3rem;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.tool-description h2 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.tool-description h3 {
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

.tool-description ul, .tool-description ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.tool-description li {
    margin-bottom: 0.5rem;
}

/* Footer Styles */
.main-footer {
    background-color: var(--footer-bg);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Upload Section */
.upload-section {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: var(--accent-color);
}

.upload-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.upload-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #000000;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: scale(1.05);
    background-color: #FFE44D;
}

.file-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Preview Section */
.preview-section {
    margin: 2rem 0;
}

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

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    background-color: #000000;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-item .delete-btn:hover {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    font-family: 'Montserrat', sans-serif;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn.primary {
    background-color: var(--accent-color);
    color: #000000;
}

.btn.secondary {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.btn:hover {
    transform: scale(1.05);
}

.btn.primary:hover {
    background-color: #FFE44D;
}

.btn.secondary:hover {
    background-color: #A9A9A9;
}

/* Download Section */
.download-section {
    text-align: center;
    padding: 2rem;
}

.download-content i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner i {
    font-size: 3rem;
    color: var(--accent-color);
}

/* Error Message */
.error-message {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--error-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .main-nav {
        display: none; /* Add mobile menu functionality */
    }

    .tool-header h1 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .header-flex {
        flex-direction: row;
        gap: 1rem;
        min-height: 56px;
    }
    .logo img {
        height: 56px;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.5rem;
    }

    .upload-section {
        padding: 2rem 1rem;
    }

    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Accessibility */
.btn:focus,
.upload-btn:focus,
.main-nav a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* Drag and Drop States */
.upload-section.drag-over {
    border-color: var(--accent-color);
    background-color: rgba(255, 215, 0, 0.1);
}

/* Preview Item Drag and Drop */
.preview-item.dragging {
    opacity: 0.5;
    cursor: move;
}

.preview-item.drag-over {
    border: 2px solid var(--accent-color);
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    padding: 2rem;
}

.mobile-nav {
    margin-top: 3rem;
}

.mobile-nav ul {
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav .dropdown-menu {
    position: static;
    background: none;
    box-shadow: none;
    padding-left: 1rem;
    display: none;
}

.mobile-nav .dropdown-menu a {
    color: var(--text-secondary);
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-close:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-nav ul {
        display: flex;
        flex-direction: column;
    }

    .mobile-nav .dropdown {
        width: 100%;
    }

    .mobile-nav .dropdown-menu {
        width: 100%;
    }
}

/* Ad Container Styles */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    width: 100%;
}

.ad-banner {
    max-width: 100%;
    min-height: 90px;
}

.ad-fluid {
    max-width: 100%;
    min-height: 120px;
}

@media (max-width: 768px) {
    .ad-banner, .ad-fluid {
        min-height: 60px;
    }
    .ad-container {
        margin: 1rem 0;
    }
} 