:root {
    --primary-color: #0081c9;
    --primary-hover: #006da7;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
}

.tiny-text {
    font-size: 0.72rem;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: #333;
    min-height: 100vh;
    margin: 0;
}

.main-wrapper {
    background: rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

#formSection .glass-card {
    transition: box-shadow 0.4s ease;
}

.form-label {
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: #495057;
}

.form-control-sm {
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.form-control-sm:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 129, 201, 0.12);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 12px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 129, 201, 0.25);
}

.btn-light {
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-light:hover {
    background-color: #fff;
    transform: translateY(-1px);
}

.gap-2 {
    gap: 0.75rem !important;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-radius: 10px;
}

.pdf-viewer-container {
    background: #e9ecef;
    min-height: 100vh;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pdf-toolbar {
    z-index: 1050;
    height: 56px;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

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

.rounded-pill {
    border-radius: 50rem !important;
}

canvas {
    max-width: none;
    height: auto !important;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transition: transform 0.3s ease;
}

canvas:hover {
    transform: scale(1.005);
}

@media (max-width: 576px) {
    body.pdf-open {
        background: #e9ecef;
        overflow: hidden;
    }

    .main-wrapper {
        padding: 0 !important;
    }

    #resultSection.row {
        margin: 0 !important;
        width: 100vw;
    }

    .glass-card {
        padding: 2rem 1.5rem !important;
        border-radius: 20px;
    }

    h2 {
        font-size: 1.35rem;
    }

    .pdf-viewer-container {
        padding: 0 !important;
        padding-top: 60px !important;
    }

    canvas {
        margin-bottom: 5px !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    #resultSection {
        margin-top: 0 !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        background: #fff;
        overflow-y: auto;
    }

    .pdf-viewer-container {
        min-height: 100vh;
        padding: 0 !important;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: #f0f0f0;
    }

    canvas {
        margin-bottom: 0 !important;
        box-shadow: none !important;
    }

    .mobile-close-bar {
        position: sticky;
        top: 0;
        z-index: 1060;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#formSection,
#resultSection {
    animation: fadeInUp 0.55s ease-out forwards;
}