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

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --secondary: #ef4444;
    --accent: #f87171;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --text: #374151;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text);
    background: var(--light);
    overflow-x: hidden;
}

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

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

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

.btn-premium {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    z-index: 1001;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(185, 28, 28, 0.95) 50%, rgba(239, 68, 68, 0.95) 100%),
                url('https://images.unsplash.com/photo-1618044733300-9472054094ee?w=1920&q=80') center/cover;
    color: white;
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: heroFadeIn 1s ease;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="1.5" fill="white" opacity="0.15"/></svg>');
    animation: floatPattern 30s linear infinite;
    pointer-events: none;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInDown 0.8s ease, pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease 0.2s both, textGlow 3s ease-in-out infinite;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 255, 255, 0.2);
    }
    50% {
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 50px rgba(255, 255, 255, 0.4);
    }
}

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

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.4s both, slideIn 1s ease 0.4s both;
    font-weight: 400;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 0.95;
        transform: translateX(0);
    }
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.hero-feature-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-feature-item i {
    font-size: 1.2rem;
    animation: iconSpin 3s ease-in-out infinite;
}

@keyframes iconSpin {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-hero-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 15px 40px rgba(220, 38, 38, 0.4);
    }
}

.btn-hero-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 50px rgba(220, 38, 38, 0.5);
    animation: none;
}

.btn-hero-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        border-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: translateY(-3px) scale(1.05);
    animation: none;
}

/* Tools Section */
.tools-section {
    padding: 4rem 0;
}

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

.tool-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tool-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.tool-icon.merge {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.tool-icon.split {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.tool-icon.compress {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.tool-icon.convert {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.tool-icon.rotate {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.tool-icon.watermark {
    background: linear-gradient(135deg, #30cfd0, #330867);
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.tool-card p {
    color: var(--text);
    font-size: 0.9rem;
}

/* Features Section */
.features-section {
    background: white;
    padding: 4rem 0;
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-card i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background: white;
    max-width: 700px;
    margin: 2rem auto;
    border-radius: 30px;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

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

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.upload-area i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.upload-area p {
    color: var(--text);
    font-size: 0.9rem;
}

#fileInput {
    display: none;
}

/* File List */
.file-list {
    margin: 2rem 0;
}

.file-item {
    background: var(--light);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
}

.file-item:hover {
    background: #e5e7eb;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-info i {
    font-size: 2rem;
    color: var(--primary);
}

.file-details h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.2rem;
}

.file-details p {
    font-size: 0.8rem;
    color: var(--text);
}

.remove-file {
    background: var(--danger);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.remove-file:hover {
    transform: scale(1.1);
}

/* Options Area */
.options-area {
    margin: 2rem 0;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.option-group select,
.option-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.option-group select:focus,
.option-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn-process {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-process:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-process:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-download {
    background: var(--success);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Progress Area */
.progress-area {
    text-align: center;
    padding: 2rem 0;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    color: var(--text);
    font-weight: 600;
}

/* Result Area */
.result-area {
    text-align: center;
    padding: 3rem 0;
}

.success-animation {
    margin-bottom: 2rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-area i {
    font-size: 5rem;
    color: var(--success);
    animation: checkBounce 0.6s ease;
}

@keyframes checkBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.result-area h3 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.success-message {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.8;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.btn-secondary-action {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-secondary-action:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer i {
    color: var(--danger);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: transform 0.3s ease-in-out;
        transform: translateY(-100%);
    }

    .nav-links.active {
        display: flex;
        transform: translateY(0);
    }
    
    .nav-links a {
        font-size: 1.5rem;
    }

    .btn-premium {
        font-size: 1.2rem;
        padding: 0.8rem 2rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 5rem 0 4rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-features {
        gap: 1rem;
    }

    .hero-feature-item {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .hero-cta {
        flex-direction: column;
        padding: 0 1rem;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .tool-card h3 {
        font-size: 1rem;
    }

    .tool-card p {
        font-size: 0.8rem;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 20px;
    }

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

    .upload-area i {
        font-size: 3rem;
    }

    .features-section h2 {
        font-size: 2rem;
    }

    .result-area {
        padding: 2rem 0;
    }

    .result-area i {
        font-size: 3.5rem;
    }

    .result-area h3 {
        font-size: 1.5rem;
    }

    .success-message {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .btn-download {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .btn-secondary-action {
        padding: 1rem 1.8rem;
        font-size: 0.95rem;
    }

    .result-actions {
        flex-direction: column;
        padding: 0 1rem;
    }

    .btn-download,
    .btn-secondary-action {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-badge {
        font-size: 1.5rem;
        padding: 0.8rem 1.8rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 0.8rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}
