/* Custom styles for Document Converter */

:root {
    --primary-color: #1565C0;
    --primary-hover: #1976D2;
    --success-color: #198754;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-muted: #6c757d;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --bs-primary: #1565C0;
    --bs-primary-rgb: 21, 101, 192;
}

/* Global Styles */
* {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
}

body {
    font-family: 'Montserrat', sans-serif !important;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
}

.btn, button {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
}

.navbar-brand, .nav-link {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
}

input, textarea, select {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
}

p, span, div, label {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
}

.form-control, .form-select {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
}

.card-title, .card-text {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: 0.1px !important;
}

/* Navigation */
.navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand img {
    max-height: 50px;
    width: auto;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-brand img {
    transition: transform 0.2s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
    transition: color 0.3s ease;
}

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

/* Usage Counter */
.usage-counter .badge {
    font-weight: 500;
    border-radius: 50px;
}

/* Bootstrap Primary Color Override */
.bg-primary {
    background-color: #1565C0 !important;
}

.btn-primary {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: #1976D2 !important;
    border-color: #1976D2 !important;
    color: white !important;
}

.btn-primary:focus {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(21, 101, 192, 0.25) !important;
}

.btn-primary:active {
    background-color: #1976D2 !important;
    border-color: #1976D2 !important;
    color: white !important;
}

.btn-primary.active {
    background-color: #1976D2 !important;
    border-color: #1976D2 !important;
    color: white !important;
}

.text-primary {
    color: #1565C0 !important;
}

.border-primary {
    border-color: #1565C0 !important;
}

.btn-outline-primary {
    color: #1565C0 !important;
    border-color: #1565C0 !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: white !important;
}

.btn-outline-primary:focus {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(21, 101, 192, 0.25) !important;
}

.btn-outline-primary:active {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: white !important;
}

.btn-outline-primary.active {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: white !important;
}

/* Convert Button Specific Override */
#convertBtn {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: white !important;
}

#convertBtn:hover {
    background-color: #1976D2 !important;
    border-color: #1976D2 !important;
    color: white !important;
}

#convertBtn:focus {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(21, 101, 192, 0.25) !important;
}

#convertBtn:active {
    background-color: #1976D2 !important;
    border-color: #1976D2 !important;
    color: white !important;
}

/* Conversion Type Selector */
.conversion-selector .btn-check:checked + .btn {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.conversion-selector .btn-outline-primary {
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.conversion-selector .btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Drop Zone */
.drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #fafafa;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(21, 101, 192, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.drop-zone-content {
    position: relative;
    z-index: 2;
}

.drop-zone-icon {
    width: 4rem;
    height: 4rem;
    color: var(--text-muted);
    margin: 0 auto;
}

.drop-zone:hover .drop-zone-icon {
    color: var(--primary-color);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Selected File */
.selected-file .card {
    border: 1px solid var(--success-color);
    background-color: rgba(25, 135, 84, 0.05);
}

/* Social Sharing Styles */
.social-sharing-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.social-share-btn {
    transition: all 0.2s ease;
    border-radius: 6px;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    white-space: nowrap;
}

.social-share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-share-btn i {
    margin-right: 0.25rem;
}

/* Success sharing highlight */
.sharing-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.sharing-success .social-sharing-container {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(25, 135, 84, 0.2);
}

/* Conversion success animation */
.conversion-success-banner {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.share-cta {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-align: center;
    margin: 0.5rem 0;
    border: none;
    width: 100%;
    font-weight: 500;
    transition: all 0.3s ease;
}

.share-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: white;
}

/* Convert Button */
#convertBtn {
    transition: all 0.3s ease;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
}

#convertBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

#convertBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading states for convert button */
#convertBtn.loading {
    position: relative;
    color: transparent !important;
}

#convertBtn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top: 2px solid transparent;
    animation: btn-spin 0.8s linear infinite;
}

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

/* Quick fade transitions for better UX */
.btn {
    transition: all 0.2s ease-in-out;
}

/* Features Section */
.feature-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(21, 101, 192, 0.1);
    border-radius: 50%;
}

.feature-icon svg {
    width: 2rem;
    height: 2rem;
}

/* Premium Page */
.card {
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

/* Roboto for mobile too */
@media (max-width: 768px) {
    body {
        font-family: 'Roboto', sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    /* Navigation adjustments */
    .navbar {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .navbar-brand img {
        max-height: 40px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0.5rem;
        margin: 0.25rem 0.125rem;
        font-size: 0.9rem;
    }
    
    .navbar-nav {
        gap: 0.25rem;
    }
    
    /* Main content spacing */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Hero section adjustments */
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    /* Drop zone mobile optimization */
    .drop-zone {
        padding: 1.5rem 0.75rem;
        margin: 0.75rem 0;
        border-radius: 1rem;
    }
    
    .drop-zone-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .drop-zone h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .drop-zone p {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    /* Conversion selector spacing */
    .conversion-selector .btn {
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem;
        border-radius: 1rem;
        font-weight: 600;
        font-size: 0.9rem;
        border-width: 1.5px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }
    
    .conversion-selector .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }
    
    .conversion-selector .btn-check:checked + .btn {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
        color: white;
        box-shadow: 0 4px 16px rgba(21, 101, 192, 0.3);
    }
    
    /* Convert button */
    #convertBtn {
        width: 100%;
        margin-top: 0.75rem;
        padding: 0.875rem;
        font-size: 0.95rem;
        border-radius: 0.875rem;
    }
    
    /* Usage counter */
    .usage-counter {
        margin: 0.75rem 0;
        text-align: center;
    }
    
    .usage-counter .badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        border-radius: 1rem;
    }
    
    /* Compact spacing for mobile */
    .row {
        margin-bottom: 0.5rem;
    }
    
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    /* Features section */
    .feature-icon {
        width: 2.5rem;
        height: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    .feature-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    /* Footer adjustments */
    footer {
        padding: 1.5rem 0;
    }
    
    footer img {
        height: 30px;
        margin-bottom: 0.75rem;
    }
    
    footer p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    /* Improve mobile touch targets */
    .btn {
        min-height: 44px;
    }
    
    /* Better mobile text spacing */
    .text-center h1 {
        line-height: 1.2;
    }
    
    .text-center p {
        line-height: 1.5;
    }
    
    /* Premium page mobile improvements */
    .premium-container {
        padding: 1rem 0.75rem !important;
    }
    
    .premium-container .card {
        margin-bottom: 2rem;
        border-radius: 1.25rem;
    }
    
    .premium-container .card-body {
        padding: 1.5rem 1rem;
    }
    
    .premium-container .card-header {
        padding: 1rem 0;
        margin-bottom: 1rem;
        border-bottom: 1px solid #eee;
    }
    
    .premium-container .card-body {
        padding: 1rem 0;
    }
    
    .premium-container .list-group-item {
        padding: 0.75rem 0;
        border: none;
        background: transparent;
    }
    
    .premium-container .btn {
        margin-top: 1rem;
        margin-bottom: 1.5rem;
        padding: 1rem;
        border-radius: 1rem;
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .premium-container h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .premium-container .display-4 {
        font-size: 2.5rem;
        margin: 0.5rem 0;
    }
    
    .premium-container .text-muted {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Mobile-specific premium layout improvements */
    .premium-container .row {
        margin: 0;
    }
    
    .premium-container .col-lg-8 {
        padding: 0;
    }
    
    .premium-container ul {
        padding-left: 0;
        margin-bottom: 1.5rem;
    }
    
    .premium-container ul li {
        margin-bottom: 0.75rem;
        font-size: 0.95rem;
    }
    
    .premium-container .display-3 {
        font-size: 2.5rem;
        margin: 1rem 0;
    }
    
    .premium-container h5 {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Card spacing improvements */
    .premium-container .card-header {
        padding: 1.25rem 1rem;
    }
    
    .premium-container .card-header h3 {
        font-size: 1.25rem;
        margin: 0;
    }
}

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

.card.border-primary {
    border-width: 2px !important;
}

.card.border-success {
    border-width: 2px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .drop-zone-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .display-4 {
        font-size: 2rem !important;
    }
    
    .feature-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .feature-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

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

.selected-file {
    animation: fadeIn 0.3s ease;
}

/* Loading States */
.loading .btn {
    position: relative;
    color: transparent;
}

.loading .btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Alert Customizations */
.alert {
    border-radius: 0.75rem;
    border: none;
    box-shadow: var(--shadow);
}

.alert svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* File Input Styling */
input[type="file"] {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

/* Badge Customizations */
.badge {
    display: inline-flex;
    align-items: center;
}

.badge svg {
    width: 1rem;
    height: 1rem;
}

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
}

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

.btn-lg {
    font-weight: 600;
}
