/* Base Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --error-color: #e63946;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* Font-face declarations for Montserrat */
@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

/* Logo styling */
.logo-container {
    display: flex;
    justify-content: center;
}

.logo {
    display: block;
    /* The color is controlled directly in the SVG file */
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    padding: 30px;
    border-radius: var(--border-radius);
    background-color: var(--white);
    box-shadow: var(--shadow-md);
}

.loading-content p {
    margin-top: 15px;
    font-weight: 500;
    color: var(--text-color);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid rgba(67, 97, 238, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Loader */
.btn-loader {
    display: none;
    /* display: inline-block; */
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

/* Error Message */
.error-message {
    background-color: rgba(230, 57, 70, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    display: none;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.error-content svg {
    color: var(--error-color);
    stroke: var(--error-color);
    flex-shrink: 0;
}

.error-content p {
    flex-grow: 1;
    color: var(--error-color);
    font-weight: 500;
}

.error-content button {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Upload Area */
.upload-area {
    background-color: var(--white);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    transition: var(--transition);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
}

.upload-area.drag-over {
    border-color: var(--accent-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.upload-inner {
    max-width: 500px;
    margin: 0 auto;
}

.upload-inner svg {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-inner h3 {
    margin-bottom: 10px;
}

.file-input-label {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    margin: 15px 0;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.file-input-label:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.support-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* Preview Section */
.preview-container {
    display: none;
    margin-bottom: 40px;
}

.preview-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .preview-wrapper {
        flex-direction: row;
    }
    
    .image-preview {
        flex: 2;
    }
    
    .preview-info {
        flex: 1;
    }
}

.image-preview {
    position: relative;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

#preview-img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

#image-details p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Options Section */
.options {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.toggle-container {
    margin-bottom: 10px;
}

.toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.toggle-label {
    font-weight: 500;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    background-color: #ccc;
    border-radius: 34px;
    transition: .3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

.toggle-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 0;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button {
    cursor: pointer;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

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

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

.secondary-btn {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

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

/* Result Section */
.result-container {
    display: none;
    margin-bottom: 40px;
}

.slices-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.slice-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    aspect-ratio: 4/5;
    background-color: var(--white);
}

.slice-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

.slice-item .slice-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(67, 97, 238, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.slice-item .slice-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(38, 70, 83, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.slice-item .resolution {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

/* Styling for full view item */
.full-view-item {
    background-color: rgba(67, 97, 238, 0.05);
    border: 2px solid var(--primary-color);
}

@media (min-width: 768px) {
    .slices-preview {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.download-section {
    text-align: center;
    margin-top: 20px;
}

/* Advertisement Card */
.analogvibes-card {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin: 60px 0;
}

.analogvibes-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.analogvibes-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.analogvibes-content {
    padding: 25px;
}

.analogvibes-content h3 {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.analogvibes-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Responsive layout for larger screens */
@media (min-width: 768px) {
    .analogvibes-card {
        flex-direction: row;
        align-items: center;
        height: 350px;
    }
    
    .analogvibes-image {
        width: 40%;
        height: 100%;
    }
    
    .analogvibes-content {
        width: 60%;
    }
}

/* ...existing code... */

/* Footer */
footer {
    margin-top: 60px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

/* Footer */
footer {
    margin-top: 60px;
    text-align: center;
    color: var(--text-light);
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-info {
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-color);
    transition: all 0.3s ease;
    color: var(--text-color);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.instagram-icon {
    stroke: currentColor;
}

.legal-link {
    color: var(--text-light);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.legal-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Responsive footer */
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}