/* Modern Polished Design for CrushMyPDF */

:root {
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8f9fa;
    --dark: #1f2937;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* Global Styles */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--dark);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    letter-spacing: -0.5px;
}

.fw-800 {
    font-weight: 800;
}

.fw-900 {
    font-weight: 900;
}

.fw-700 {
    font-weight: 700;
}

.fw-600 {
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-badge {
    display: inline-block;
    animation: fadeInDown 0.6s ease;
}

.badge {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%) !important;
    color: var(--primary) !important;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

.hero-title {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease 0.1s both;
    letter-spacing: -1px;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s both;
    max-width: 600px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Upload Card */
.upload-card {
    background: white;
    border-radius: 16px;
    animation: fadeInUp 0.8s ease 0.3s both;
    position: relative;
    overflow: hidden;
}

.upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
}

.shadow-xl {
    box-shadow: var(--shadow-xl) !important;
}

.shadow-xl:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
}

/* File Input */
.file-input-wrapper {
    position: relative;
    border: 2px dashed var(--gray-light);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.file-input-wrapper:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.02);
}

.file-input-wrapper.drag-over {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-hint {
    pointer-events: none;
    color: var(--gray);
}

.file-input-hint i {
    color: var(--primary);
}

/* Compression Options */
.compression-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compression-option {
    position: relative;
    background: white;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compression-option:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.02);
    transform: translateX(4px);
}

.compression-option input:checked + label {
    color: var(--dark);
}

.compression-option input:checked + label strong {
    color: var(--primary);
}

.compression-option input:checked ~ * {
    color: var(--primary);
}

.compression-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.compression-option input[type="radio"]:checked + label {
    background: rgba(59, 130, 246, 0.05);
}

.compression-option input[type="radio"]:checked {
    display: none;
}

.compression-option:has(input:checked) {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    min-height: 44px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.compress-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white !important;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.compress-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
    color: white !important;
}

.compress-btn:active {
    transform: translateY(-1px);
}

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

.btn-outline-primary:hover {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
}

/* Features Section */
.features-section {
    background: white;
}

.feature-card {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.stat-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

/* How It Works */
.how-it-works {
    background: white;
}

.step-card {
    background: white;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

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

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 auto;
}

/* Success Section */
.success-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.success-checkmark {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.check-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    animation: scaleIn 0.5s ease;
}

.stat-display {
    padding: 2rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-display:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
}

.stat-label {
    color: var(--gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 0.5rem;
}

.reduction-indicator {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--success));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 24px;
    animation: bounce 2s infinite;
}

.reduction-highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
}

.reduction-percentage {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reduction-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.reduction-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 10px;
    animation: fillBar 1s ease;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
}

.alert-success {
    background: rgba(16, 185, 129, 0.05);
    color: #047857;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.05);
    color: #7f1d1d;
    border-left: 4px solid var(--danger);
}

/* Navbar */
.navbar {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: none !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--gray) !important;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--gray-light);
    margin-top: auto;
}

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

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

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 44px;
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-label {
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.form-text {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Cards */
.card {
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: 2rem;
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes fillBar {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

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

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --shadow-xl: 0 15px 20px rgba(0, 0, 0, 0.1);
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .reduction-percentage {
        font-size: 2.5rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .compression-option {
        padding: 0.75rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .py-md-6 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .mb-md-6 {
        margin-bottom: 2rem !important;
    }

    .p-md-5 {
        padding: 1.5rem !important;
    }

    .file-input-wrapper {
        padding: 1.5rem 1rem;
    }

    .check-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }

    .stat-display {
        padding: 1.5rem 1rem;
    }

    .success-checkmark {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }

    .min-vh-75 {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        font-size: 1.1rem;
    }

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

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

    .display-4 {
        font-size: 1.5rem;
    }

    .feature-card, .step-card, .stat-card {
        padding: 1rem;
    }

    .compression-option {
        padding: 0.75rem 0.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .alert {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .row g-4 {
        gap: 1rem !important;
    }

    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .mb-5 {
        margin-bottom: 1.5rem !important;
    }

    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Utility Classes */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--gray) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-light {
    background-color: var(--light) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: white;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .navbar, .footer {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
