/* Base Styles */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --light-gray: #bdc3c7;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--white);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-login {
    background-color: transparent;
    color: var(--dark-color);
    margin-right: 10px;
}

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

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

.btn-signup:hover {
    background-color: var(--primary-dark);
}

.btn-browse {
    background-color: var(--primary-color);
    color: var(--white);
    margin-top: 15px;
}

.btn-browse:hover {
    background-color: var(--primary-dark);
}

.btn-generate {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px 30px;
    font-size: 18px;
}

.btn-generate:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-generate:disabled {
    background-color: var(--gray-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-cta {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 15px 30px;
    font-size: 18px;
    margin-top: 20px;
}

.btn-cta:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    max-width: 500px;
    padding: 30px;
}

.loading-screen .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.loading-screen .logo i {
    margin-right: 15px;
    font-size: 40px;
}

.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress {
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: var(--gray-color);
}

.loading-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 15px;
}

.stat i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat span {
    font-size: 14px;
    color: var(--gray-color);
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 15px 0;
    transition: var(--transition);
}

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

.header .logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.header .logo i {
    margin-right: 10px;
    font-size: 28px;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav ul li a:hover {
    color: var(--primary-color);
}

.nav ul li a.active {
    color: var(--primary-color);
}

.nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-color);
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-color);
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    color: var(--gray-color);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    text-align: center;
    animation: float 6s ease-in-out infinite;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Upload Section */
.upload-section {
    padding: 80px 0;
    background-color: var(--white);
}

.upload-container {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

.upload-header {
    text-align: center;
    margin-bottom: 30px;
}

.upload-header h2 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.upload-header p {
    color: var(--gray-color);
    font-size: 16px;
}

.upload-area {
    border: 2px dashed var(--light-gray);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.upload-area i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.upload-area p {
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.upload-area span {
    display: block;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.upload-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.upload-options .option {
    display: flex;
    align-items: center;
}

.upload-options input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

.upload-options select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
    background-color: var(--white);
    color: var(--dark-color);
    cursor: pointer;
}

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

/* Preview Section */
.preview-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.preview-section h2 {
    text-align: center;
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.preview-container {
    min-height: 200px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 30px;
}

.no-images, .no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: var(--gray-color);
}

.no-images i, .no-results i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--light-gray);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.image-item .image-name {
    padding: 10px;
    background-color: var(--white);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.generate-btn-container {
    text-align: center;
}

/* Results Section */
.results-section {
    padding: 60px 0;
    background-color: var(--white);
}

.results-section h2 {
    text-align: center;
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.results-container {
    min-height: 200px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.link-item {
    background-color: var(--white);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.link-item:last-child {
    margin-bottom: 0;
}

.link-url {
    flex: 1;
    font-size: 14px;
    color: var(--dark-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 15px;
}

.btn-copy {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background-color: var(--primary-dark);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.features-section h2 {
    text-align: center;
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 30px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
    font-size: 15px;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col p {
    margin-bottom: 20px;
    opacity: 0.8;
    font-size: 14px;
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    opacity: 0.8;
}

.footer-col ul li a:hover {
    color: var(--white);
    opacity: 1;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.7;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--dark-color);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .hero-image {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero {
        padding: 150px 0 80px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .upload-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 30px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
    
    .upload-container {
        padding: 20px 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}