/* Modern Theme for Salzling Websites
   Based on filehost styling
   Designed for dark/light mode support */

:root {
    /* Light Mode Colors */
    --bg-color: #fff;
    --text-color: #000;
    --accent-color: #4f46e5;
    --hover-color: #4338ca;
    --border-color: #e5e7eb;
    --element-bg: #f8fafc;
    --secondary-text: #64748b;
    --danger-color: #dc2626;
    --success-color: #059669;
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --warning-color: #f97316;
    --card-bg: var(--element-bg);
    
    /* UI Elements */
    --border-radius: 8px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1f2937;
        --text-color: #fff;
        --border-color: #374151;
        --element-bg: #111827;
        --secondary-text: #9ca3af;
        --card-bg: #1e293b;
    }
}

.dark-mode {
    --bg-color: #1f2937;
    --text-color: #fff;
    --border-color: #374151;
    --element-bg: #111827;
    --secondary-text: #9ca3af;
    --card-bg: #1e293b;
}

/* Base Styles */
body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
}

.container-modern {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.navbar {
    transition: all 0.3s ease;
}

.navbar-light {
    background-color: var(--element-bg) !important;
    box-shadow: var(--box-shadow);
}

.navbar-dark {
    background-color: var(--card-bg) !important;
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    font-weight: 600;
    color: var(--text-color) !important;
}

.navbar-light .navbar-nav .nav-link,
.navbar-dark .navbar-nav .nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:hover {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--accent-color) !important;
}

.navbar-light .navbar-toggler,
.navbar-dark .navbar-toggler {
    border-color: transparent;
}

.navbar-img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.navbar-img:hover {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn-secondary {
    background: var(--secondary-text);
    color: #fff;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

/* Cards */
.card-modern {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card-header {
    background: var(--card-bg);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: var(--card-bg);
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

/* Forms */
.form-control {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    outline: none;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-text {
    color: var(--secondary-text);
    font-size: 0.875rem;
    margin-top: 5px;
}

.form-group {
    margin-bottom: 20px;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(5, 150, 105, 0.1);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    border-left-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(79, 70, 229, 0.1);
    border-left-color: var(--accent-color);
    color: var(--accent-color);
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 8px;
    background: var(--element-bg);
    color: var(--text-color);
    box-shadow: var(--box-shadow-hover);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid;
}

.toast.success {
    border-color: var(--success-color);
    background: rgba(5, 150, 105, 0.1);
}

.toast.error {
    border-color: var(--danger-color);
    background: rgba(220, 38, 38, 0.1);
}

.toast.info {
    border-color: var(--accent-color);
    background: rgba(79, 70, 229, 0.1);
}

.toast.warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* User Profile Card */
.profile-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.profile-card:hover {
    box-shadow: var(--box-shadow-hover);
}

.profile-header {
    height: 120px;
    background: var(--primary-color);
    position: relative;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--card-bg);
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: translateX(-50%) scale(1.05);
}

.profile-body {
    padding: 70px 20px 20px;
    text-align: center;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.profile-headline {
    color: var(--secondary-text);
    margin-bottom: 15px;
}

.profile-bio {
    color: var(--text-color);
    margin-bottom: 20px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.stat-label {
    color: var(--secondary-text);
    font-size: 0.875rem;
}

/* Footer */
.footer-modern {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 40px 0 0;
    margin-top: 60px;
}

.footer-heading {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--secondary-text);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--element-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.social-icon i {
    color: var(--text-color);
    font-size: 1.2rem;
}

.social-icon:hover i {
    color: #fff;
}

.footer-bottom {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--secondary-text);
    margin: 0;
}

/* Avatar Upload */
.avatar-upload {
    position: relative;
    max-width: 200px;
    margin: 0 auto;
}

.avatar-preview {
    width: 160px;
    height: 160px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--card-bg);
    box-shadow: var(--box-shadow);
}

.avatar-preview > div {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.avatar-edit {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1;
}

.avatar-edit input {
    display: none;
}

.avatar-edit label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    border: 2px solid var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
}

.avatar-edit label:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Jumbotron */
.jumbotron-modern {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.jumbotron-heading {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
}

.jumbotron-subheading {
    color: var(--secondary-text);
    font-weight: 400;
    margin-bottom: 30px;
}

/* Feature Cards */
.feature-card {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.feature-icon {
    margin-bottom: 15px;
    color: var(--accent-color);
}

.feature-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-description {
    color: var(--secondary-text);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Dark Mode Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(79, 70, 229, 0.1);
}

/* Dropdown Styles */
.dropdown-menu {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    padding: 0.5rem 0;
}

.dropdown-item {
    color: var(--text-color);
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--accent-color);
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
}

/* Media Queries */
@media (max-width: 767.98px) {
    .profile-img {
        width: 100px;
        height: 100px;
        bottom: -50px;
    }
    
    .profile-body {
        padding-top: 60px;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* Language Switcher */
.lang-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.lang-menu:hover {
    background: rgba(79, 70, 229, 0.1);
}

.lang-flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
}

.lang-text {
    font-weight: 500;
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern th,
.table-modern td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.table-modern th {
    background: var(--card-bg);
    color: var(--text-color);
    font-weight: 600;
    text-align: left;
}

.table-modern tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr {
    transition: all 0.3s ease;
}

.table-modern tbody tr:hover {
    background: rgba(79, 70, 229, 0.05);
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
    color: #fff;
}

.badge-success {
    background: var(--success-color);
    color: #fff;
}

.badge-danger {
    background: var(--danger-color);
    color: #fff;
}

.badge-warning {
    background: var(--warning-color);
    color: #fff;
}

/* Loading Spinners */
.spinner-border {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid var(--accent-color);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner 0.75s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* File Upload Zone */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    padding: 40px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-zone:hover,
.file-upload-zone.active {
    border-color: var(--accent-color);
    background: rgba(79, 70, 229, 0.05);
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.file-upload-text {
    color: var(--secondary-text);
}

/* ShareX Token Display */
.token-display {
    position: relative;
    background: var(--element-bg);
    padding: 12px 15px;
    border-radius: var(--border-radius);
    font-family: monospace;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: nowrap;
}

.copy-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-button:hover {
    color: var(--accent-color);
}