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

.tool-header h1 {
    font-size: 3em;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.tool-header p {
    font-size: 1.2em;
    color: #bbb;
    max-width: 700px;
    margin: 0 auto;
}

.upload-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 50px;
}

.upload-group {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    text-align: center;
}

.upload-group h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.upload-box {
    width: 100%;
    height: 300px;
    border: 3px dashed #444;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #1a1a1a;
    position: relative;
    overflow: hidden;
}

.upload-box:hover {
    border-color: #667eea;
    background-color: #2a2a2a;
}

.upload-box.has-file {
    border-color: #667eea;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    padding: 20px;
    text-align: center;
}

.upload-content svg {
    margin-bottom: 15px;
    color: #764ba2;
}

.upload-content p {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.upload-content span {
    font-size: 0.9em;
    color: #666;
}

.upload-box .preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: 0;
    display: none; /* Hidden by default */
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    display: none; /* Hidden by default */
}

.remove-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 30px auto 50px auto;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.4em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.generate-btn:disabled {
    background: #444;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-section {
    background-color: #1a1a1a;
    border-radius: 20px;
    padding: 40px;
    margin-top: 60px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.result-section h3 {
    color: #fff;
    font-size: 2.2em;
    margin-bottom: 30px;
}

.result-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.result-item {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    background-color: #2a2a2a;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-item h4 {
    color: #fff;
    font-size: 1.6em;
    margin-bottom: 20px;
}

.result-media {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1 / 1;
    background-color: #3a3a3a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative; /* Added for absolute positioning of overlay */
}

.result-media img, .result-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Lock Overlay Styles */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.result-media.is-locked .lock-overlay {
    opacity: 1;
    pointer-events: auto;
}

.lock-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 12px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.lock-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.lock-subtext {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.result-media.is-locked img {
    filter: blur(10px);
    transform: scale(1.05); /* Prevent blur edge artifacts */
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.download-btn:hover:not(:disabled) {
    background: #0056b3;
}

.download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #666;
}

.status-text {
    font-size: 1.3em;
    color: #888;
    margin-top: 20px;
}

.gallery-section {
    text-align: center;
    margin-top: 80px;
    margin-bottom: 80px;
}

.gallery-section h2 {
    font-size: 2.8em;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.gallery-section p {
    font-size: 1.1em;
    color: #bbb;
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 1 / 1;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: white;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    text-align: left;
}

.cta-text {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8em;
    font-weight: 700;
    margin-top: 60px;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.info-section {
    margin-top: 80px;
    text-align: center;
}

.info-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background-color: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-7px);
}

.info-icon {
    color: #667eea;
    margin-bottom: 20px;
}

.info-icon svg {
    width: 55px;
    height: 55px;
}

.info-card h3 {
    color: #fff;
    font-size: 1.6em;
    margin-bottom: 15px;
}

.info-card p {
    color: #aaa;
    font-size: 1em;
    line-height: 1.7;
}

.faq-section {
    margin-top: 80px;
    margin-bottom: 80px;
    text-align: center;
}

.faq-section h2 {
    font-size: 2.8em;
    color: #fff;
    margin-bottom: 40px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    background-color: #1a1a1a;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid #333;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    cursor: pointer;
    background-color: #1a1a1a;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #2a2a2a;
}

.faq-question h3 {
    color: #fff;
    font-size: 1.2em;
    margin: 0;
    flex-grow: 1;
}

.faq-toggle {
    color: #667eea;
    font-size: 1.8em;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 30px 25px 30px;
    color: #aaa;
    font-size: 1em;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust as needed */
    padding-top: 15px;
}

/* Result Output Styles (AI Baby Compatible) */
.result-output {
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.result-output h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.result-media-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.result-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.result-media img,
.result-media video {
    width: 100%;
    height: auto;
    display: block;
}

/* Result Actions Container */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Download Button */
.download-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #666;
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Social Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.share-label {
    font-size: 0.9rem;
    color: #b0b0b0;
    font-weight: 500;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.share-btn:hover {
    transform: translateY(-2px) scale(1.1);
}

.facebook-share {
    background: #1877F2;
    color: white;
}

.facebook-share:hover {
    background: #0d65d9;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.whatsapp-share {
    background: #25D366;
    color: white;
}

.whatsapp-share:hover {
    background: #1ebe57;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.instagram-share {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.instagram-share:hover {
    background: linear-gradient(45deg, #d17e2d 0%, #c85a32 25%, #bd1f38 50%, #ad1d5a 75%, #9b1076 100%);
    box-shadow: 0 4px 12px rgba(193, 53, 132, 0.4);
}

/* Lock Overlay Styles */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: 16px;
}

.result-media.is-locked .lock-overlay {
    opacity: 1;
    pointer-events: auto;
}

.lock-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 12px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.lock-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.lock-subtext {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.result-media.is-locked img {
    filter: blur(10px);
    transform: scale(1.05);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2.5em;
    }

    .tool-header p {
        font-size: 1em;
        padding: 0 15px;
    }

    .upload-section {
        flex-direction: column;
        align-items: center;
    }

    .upload-group {
        max-width: 90%;
    }
    
    .generate-btn {
        width: 90%;
        font-size: 1.2em;
        padding: 12px 20px;
    }

    .result-section {
        padding: 20px;
    }

    .result-section h3 {
        font-size: 1.8em;
    }

    .result-content {
        flex-direction: column;
        gap: 20px;
    }

    .result-item {
        max-width: 90%;
    }

    .gallery-section h2, .info-section h2, .faq-section h2 {
        font-size: 2em;
    }

    .gallery-grid, .info-cards {
        gap: 15px;
        padding: 0 15px;
    }

    .cta-text {
        font-size: 1.4em;
    }

    .faq-question {
        padding: 20px 25px;
    }
}

/* Image Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10001;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.1rem;
    text-align: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
}

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

@media (max-width: 768px) {
    .lightbox-close {
        top: 15px;
        right: 25px;
        font-size: 40px;
    }

    .lightbox-caption {
        bottom: 15px;
        font-size: 0.9rem;
        padding: 8px 15px;
    }
}