/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --purple-color: #6f42c1;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
    --transition-smooth: all 0.3s ease;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    min-height: 100vh;
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
}

main {
    min-height: calc(100vh - 200px);
}

/* ========================================
   NAVIGATION BAR
   ======================================== */
.navbar {
    box-shadow: var(--shadow-sm);
    background-color: var(--primary-color) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.navbar-brand img:hover {
    transform: rotate(5deg);
}

.nav-link {
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    border-radius: 15px;
    border: none;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
    border-bottom: none;
}

.card-body {
    padding: 2rem;
}

.card.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Gradient Header Animation */
.bg-gradient {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-success:hover {
    background-color: #157347;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1rem;
}

/* ========================================
   FORMS
   ======================================== */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: var(--transition-smooth);
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    outline: none;
}

.form-control:hover, .form-select:hover {
    border-color: #c5cae9;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 5px;
}

.input-group-lg > .form-control {
    padding: 12px 16px;
}

/* ========================================
   FILE TYPE ICONS SHOWCASE
   ======================================== */
.file-type-icon {
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    cursor: default;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-type-icon:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.file-type-icon i {
    transition: var(--transition-smooth);
    display: block;
    margin: 0 auto;
}

.file-type-icon:hover i {
    transform: scale(1.3) rotate(5deg);
}

.file-type-icon p {
    margin-top: 10px;
    margin-bottom: 0;
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
}

/* ========================================
   FILE PREVIEW
   ======================================== */
#filePreview .alert {
    border-left: 4px solid var(--info-color);
    background-color: rgba(13, 202, 240, 0.1);
    border-radius: 10px;
    animation: slideIn 0.5s ease;
}

#filePreview .alert i {
    font-size: 3rem;
}

/* ========================================
   LOADING SPINNER
   ======================================== */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
    border-width: 3px;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

#loadingDiv {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   RESULT SECTION
   ======================================== */
#resultDiv {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   TEXT & TYPOGRAPHY
   ======================================== */
.display-4 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-purple {
    color: var(--purple-color) !important;
}

.text-muted {
    color: #6c757d !important;
}

.fw-bold {
    font-weight: 700 !important;
}

/* ========================================
   FONT STYLES
   ======================================== */
.font-monospace {
    font-size: 0.85rem;
    background-color: var(--light-bg);
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: #055160;
    border-left: 4px solid var(--info-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #664d03;
    border-left: 4px solid var(--warning-color);
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #0a3622;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #58151c;
    border-left: 4px solid var(--danger-color);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    background-color: var(--dark-bg) !important;
    padding: 20px 0;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========================================
   FILE ICONS
   ======================================== */
.bi-file-pdf:hover, 
.bi-file-word:hover, 
.bi-file-excel:hover, 
.bi-file-ppt:hover,
.bi-file-image:hover, 
.bi-file-code:hover,
.bi-file-play:hover,
.bi-file-music:hover,
.bi-file-zip:hover {
    transform: scale(1.1);
    transition: var(--transition-smooth);
}

/* Specific File Icon Colors */
.bi-file-pdf {
    color: #dc3545 !important;
}

.bi-file-word {
    color: #2b579a !important;
}

.bi-file-excel {
    color: #217346 !important;
}

.bi-file-ppt {
    color: #d24726 !important;
}

.bi-file-image {
    color: #0dcaf0 !important;
}

.bi-file-code {
    color: #198754 !important;
}

.bi-file-play {
    color: #dc3545 !important;
}

.bi-file-music {
    color: #6f42c1 !important;
}

.bi-file-zip {
    color: #ffc107 !important;
}

/* ========================================
   UTILITIES
   ======================================== */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-lg {
    border-radius: 15px !important;
}

.rounded-xl {
    border-radius: 20px !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Large Screens (Desktop) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Medium Screens (Tablet) */
@media (max-width: 992px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
}

/* Small Screens (Mobile) */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .file-type-icon {
        padding: 10px;
    }
    
    .file-type-icon i {
        font-size: 2rem !important;
    }
    
    .file-type-icon p {
        font-size: 0.75rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .form-control, .form-select {
        font-size: 0.9rem;
        padding: 10px 14px;
    }
}

/* Extra Small Screens */
@media (max-width: 576px) {
    .display-4 {
        font-size: 1.75rem;
    }
    
    .file-type-icon {
        padding: 8px;
    }
    
    .file-type-icon i {
        font-size: 1.5rem !important;
    }
    
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    body {
        background: white;
    }
    
    .navbar, footer, .btn, #loadingDiv {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   HOVER EFFECTS & TRANSITIONS
   ======================================== */
.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-shadow {
    transition: var(--transition-smooth);
}

.hover-shadow:hover {
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: var(--transition-smooth);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ========================================
   BADGE STYLES
   ======================================== */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ========================================
   CUSTOM UTILITIES
   ======================================== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cursor-pointer {
    cursor: pointer;
}

/* ========================================
   END OF STYLESHEET
   ======================================== */
