/**
 * Plugin Name: Upload Center UPITIN Project
 * Main Stylesheet - Added Animated Gradient
 */

/* --- Base Variables --- */
:root {
    --brand: #ffc300;
    --primary-blue: #2563eb;
    --header-bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    --nav-bg-mobile: #ffffff;
    
    /* Light Mode Colors */
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --footer-bg: #ffffff;
}

/* Dark Mode Variables Override */
[data-bs-theme="dark"] {
    --bg-body: #0b0f14;      
    --bg-card: #151f2e;      
    --text-main: #e5e7eb;    
    --text-muted: #9ca3af;   
    --border-color: #1f2937; 
    --footer-bg: #151f2e;
    --nav-bg-mobile: #151f2e;
}

/* --- Global Layout --- */
body {
    padding-top: 70px !important;
    padding-bottom: 80px !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

@media (min-width: 992px) {
    body {
        padding-top: 80px !important;
        padding-bottom: 0 !important;
    }
}

.container, main.container {
    max-width: 1140px !important;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

main.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* --- Header Styling --- */
.navbar, .mobile-top-header {
    background: var(--header-bg-gradient) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom: none !important;
}

.navbar-brand span, .nav-link, .mobile-top-header .text-body, .mobile-top-header i {
    color: #ffffff !important;
}

.mobile-top-header .btn-outline-primary {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

@media (min-width: 992px) {
    .navbar-nav .nav-link, .navbar a.link-light {
        font-size: 0.9rem;
    }
}

/* --- Footer Styling --- */
footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-main);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    width: 100%;
}

footer .text-secondary {
    color: var(--text-muted) !important;
}

/* --- Card Styling --- */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* --- Modern Dropzone --- */
.modern-dropzone {
    background-color: rgba(37, 99, 235, 0.03);
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-dropzone:hover, .modern-dropzone.drag {
    background-color: rgba(37, 99, 235, 0.08);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.modern-dropzone .icon-circle {
    transition: transform 0.3s ease;
}

.modern-dropzone:hover .icon-circle {
    transform: scale(1.1);
}

/* --- Form Controls --- */
.form-control, .form-select, .input-group-text {
    border-color: var(--border-color);
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    border-color: var(--primary-blue);
}

.input-group-text {
    background-color: rgba(0,0,0,0.02);
}

/* --- Mobile Bottom Navigation --- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--header-bg-gradient);
    border-top: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
    transition: background-color 0.3s ease;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    flex: 1;
    height: 100%;
    transition: color 0.2s;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.mobile-bottom-nav .nav-item.active {
    color: #ffffff;
    font-weight: 600;
}

.mobile-bottom-nav .nav-item:hover {
    color: #ffffff;
}

/* --- Center FAB Button --- */
.nav-center {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
}

.fab-btn {
    width: 65px;
    height: 65px;
    background: var(--brand);
    border-radius: 50%;
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: #000000;
    font-size: 1.8rem;
    border: 4px solid var(--bg-body);
    cursor: pointer;
    animation: pulse-white 2s infinite;
    z-index: 1050;
    padding: 0;
    transition: border-color 0.3s ease;
}

@keyframes pulse-white {
    0% { box-shadow: 0 0 0 0 rgba(255, 195, 0, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 195, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 195, 0, 0); }
}

/* --- Mobile Specific Styles --- */
@media (max-width: 991px) {
    body.auth-page {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        background-color: var(--bg-body);
        justify-content: center;
    }
    
    body.auth-page .mobile-top-header,
    body.auth-page .mobile-bottom-nav,
    body.auth-page footer {
        display: none !important;
    }

    .card, .auth-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .card-body, .card-text, .card-title, h1, h2, h3, h4, h5, h6, p, label {
        color: var(--text-main);
    }

    .auth-mobile-logo {
        display: block !important;
        text-align: center;
        margin-bottom: 30px;
        margin-top: 20px;
        width: 100%;
    }
    
    .auth-mobile-logo img {
        height: 70px;
        width: auto;
        display: block;
        margin: 0 auto;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    }

    .auth-home-btn {
        display: block;
        text-align: center;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .col-md-6.text-center img {
        display: none !important;
    }
}

/* --- PWA Install Elements --- */
.pwa-install-btn {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 9999;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    animation: slideUpBtn 0.5s ease-out;
}

@keyframes slideUpBtn {
    from { bottom: -50px; opacity: 0; }
    to { bottom: 90px; opacity: 1; }
}

.ios-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.ios-modal-content {
    background-color: var(--bg-card);
    color: var(--text-main);
    width: 100%;
    max-width: 500px;
    padding: 30px 20px;
    border-radius: 20px 20px 0 0;
    position: relative;
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

.close-ios-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.ios-header img {
    width: 64px;
    border-radius: 14px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ios-steps {
    text-align: left;
    margin-top: 20px;
    background: rgba(128,128,128,0.1);
    padding: 15px;
    border-radius: 12px;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* --- Upload Info Box --- */
#limits {
    background-color: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 10px;
    padding: 10px 15px;
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 0.85rem;
    margin-top: 20px;
    text-align: center;
}

.object-fit-cover {
    object-fit: cover;
}

/* --- Progress Bar --- */
.progress-custom {
    height: 25px;
    border-radius: 12px;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
    overflow: hidden;
}

.progress-bar-custom {
    background: linear-gradient(45deg, #2563eb, #1d4ed8);
    font-weight: bold;
    font-size: 0.9rem;
    line-height: 25px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

[data-bs-theme="dark"] .progress-custom {
    background-color: #2d3748;
}

/* --- Tools Dashboard --- */
.tool-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.tool-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* --- Clipboard --- */
.clipboard-item {
    transition: background-color 0.2s;
}
.clipboard-item:hover {
    background-color: rgba(0,0,0,0.02);
}
[data-bs-theme="dark"] .clipboard-item:hover {
    background-color: rgba(255,255,255,0.05);
}

/* --- Perfect Circles --- */
.rounded-circle, .icon-circle, .tool-icon div {
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Animated Gradient Background (Green to Blue) --- */
.animated-gradient-bg {
    background: linear-gradient(270deg, #10b981, #3b82f6, #10b981);
    background-size: 400% 400%;
    animation: gradientMove 6s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 50% }
}