/* Custom CSS for Private Repository Manager - Mobile Pro Design */

/* Root variables for modern dark theme */
:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #1a1a1b;
    --bg-tertiary: #242426;
    --bg-quaternary: #2d2d30;
    --border-color: #404040;
    --border-light: #525252;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --accent-primary: #007aff;
    --accent-secondary: #5ac8fa;
    --accent-success: #30d158;
    --accent-warning: #ff9f0a;
    --accent-danger: #ff453a;
    --accent-gradient: linear-gradient(135deg, #007aff 0%, #5ac8fa 100%);
    --success-gradient: linear-gradient(135deg, #30d158 0%, #32d74b 100%);
    --warning-gradient: linear-gradient(135deg, #ff9f0a 0%, #ffcc02 100%);
    --danger-gradient: linear-gradient(135deg, #ff453a 0%, #ff6961 100%);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.25);
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
    --transition-fast: 0.2s ease-out;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern body styling with smooth scrolling */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Mobile-first responsive container */
.container-fluid {
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 768px) {
    .container-fluid {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* Modern card design with glassmorphism effect */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
    transition: all var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--border-light);
}

.card-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-quaternary) 100%);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    padding: 20px 24px;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 24px;
}

.card-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

/* Repository cards with gradient accents */
.repo-card {
    position: relative;
    overflow: hidden;
}

.repo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
}

/* Table customizations */
.table-dark {
    --bs-table-bg: var(--bg-tertiary);
    --bs-table-border-color: var(--border-color);
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--border-color);
}

.table-hover > tbody > tr:hover > * {
    background-color: var(--bg-tertiary);
}

/* List group customizations */
.list-group-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.list-group-item:hover {
    background-color: var(--bg-tertiary);
}

/* Ultra-modern navigation with glassmorphism */
.navbar {
    background: rgba(26, 26, 27, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-smooth);
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Navbar brand text truncation for long repository names */
.navbar-brand {
    max-width: 70vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .navbar-brand {
        max-width: 60vw;
        font-size: 1rem;
    }
}

/* Utility classes for text truncation */
.min-width-0 {
    min-width: 0;
}

/* Improved responsive header layout */
@media (max-width: 768px) {
    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .d-flex.gap-2.flex-shrink-0 {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn {
        flex: 1;
    }
    
    .dropdown {
        flex: 1;
    }
    
    .dropdown .btn {
        width: 100%;
    }
}

/* Loading overlay for repository operations */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notification styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    max-width: 400px;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--radius-large);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-fast);
}

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

.navbar-toggler {
    border: none;
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}

.nav-link {
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
    font-weight: 500;
    margin: 0 4px;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.nav-link.active {
    background: var(--accent-gradient);
    color: white !important;
}

.breadcrumb {
    background-color: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-secondary);
}

/* Code syntax highlighting customizations */
pre[class*="language-"] {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.5;
}

code[class*="language-"] {
    background: transparent;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
}

/* Line numbers for code */
.line-numbers .line-numbers-rows {
    border-right: 1px solid var(--border-color);
    padding-right: 1rem;
    margin-right: 1rem;
}

.line-numbers-rows > span:before {
    color: var(--text-muted);
}

/* Modern button styling with gradients and touch optimization */
.btn {
    border-radius: var(--radius-medium);
    font-weight: 500;
    transition: all var(--transition-smooth);
    border: none;
    padding: 12px 24px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-light);
    min-height: 44px; /* Touch target optimization */
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    color: white;
}

.btn-success {
    background: var(--success-gradient);
    border: none;
    color: white;
}

.btn-warning {
    background: var(--warning-gradient);
    border: none;
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    border: none;
    color: white;
}

.btn-outline-secondary {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline-secondary:hover {
    background: var(--bg-quaternary);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
    min-height: 52px;
}

/* Button groups with modern spacing */
.btn-group .btn {
    margin: 0 2px;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Modern table styling */
.table {
    background: var(--bg-secondary);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.table thead th {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    padding: 16px 20px;
    color: var(--text-secondary);
}

.table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-tertiary);
    transform: scale(1.01);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Mobile-optimized table */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: var(--radius-large);
        box-shadow: var(--shadow-medium);
    }
    
    .table thead th,
    .table tbody td {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-height: 32px;
    }
}

/* Modern form styling */
.form-control,
.form-select {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-medium);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 1rem;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-quaternary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Modern modal styling */
.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
}

.modal-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-quaternary) 100%);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    padding: 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-large) var(--radius-large);
    padding: 20px 24px;
}

.modal-title {
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* File upload drag and drop with modern styling */
.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
    border-color: var(--border-color) !important;
    border-radius: var(--radius-large);
    background: var(--bg-tertiary);
    transition: all var(--transition-smooth);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.border-dashed:hover {
    border-color: var(--accent-primary) !important;
    background: var(--bg-quaternary);
    transform: translateY(-2px);
}

.border-dashed.drag-over {
    border-color: var(--accent-success) !important;
    background: rgba(48, 209, 88, 0.1);
}

/* Alert styling with modern design */
.alert {
    border-radius: var(--radius-medium);
    border: none;
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(48, 209, 88, 0.15);
    color: var(--accent-success);
    border-left: 4px solid var(--accent-success);
}

.alert-warning {
    background: rgba(255, 159, 10, 0.15);
    color: var(--accent-warning);
    border-left: 4px solid var(--accent-warning);
}

.alert-danger {
    background: rgba(255, 69, 58, 0.15);
    color: var(--accent-danger);
    border-left: 4px solid var(--accent-danger);
}

.alert-info {
    background: rgba(0, 122, 255, 0.15);
    color: var(--accent-primary);
    border-left: 4px solid var(--accent-primary);
}

/* Progress indicators */
.spinner-border {
    color: var(--accent-primary);
}

/* Breadcrumb styling */
.breadcrumb {
    background: transparent;
    padding: 12px 0;
    margin-bottom: 24px;
}

.breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
    font-weight: bold;
}

/* Dropdown styling */
.dropdown-menu {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    padding: 8px;
}

.dropdown-item {
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
    color: var(--text-primary);
    padding: 10px 16px;
    margin: 2px 0;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 8px 0;
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    /* Larger touch targets for mobile */
    .btn {
        min-height: 48px;
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .btn-sm {
        min-height: 40px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    /* Improved spacing for mobile */
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .card {
        margin-bottom: 16px;
        border-radius: var(--radius-medium);
    }
    
    .card-body {
        padding: 20px;
    }
    
    .card-header {
        padding: 16px 20px;
    }
    
    /* Mobile navigation improvements */
    .navbar-nav .nav-link {
        padding: 12px 16px;
        margin: 4px 0;
        border-radius: var(--radius-small);
    }
    
    .dropdown-menu {
        border-radius: var(--radius-large);
        margin-top: 8px;
        min-width: 200px;
    }
    
    .dropdown-item {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Mobile form improvements */
    .form-control,
    .form-select {
        min-height: 48px;
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    /* Mobile modal improvements */
    .modal-dialog {
        margin: 16px;
        max-width: calc(100vw - 32px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

/* Repository dashboard cards with modern design */
.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .repo-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }
}

/* Repository card title text truncation */
.repo-card .card-title {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.repo-card .card-title .text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Ensure status indicators stay visible */
.status-indicator {
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

/* Mobile optimizations for repository page headers */
@media (max-width: 576px) {
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }
    
    .repo-card .card-title {
        font-size: 1.1rem;
    }
    
    .status-indicator {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .repo-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .repo-stat {
        flex: none;
        font-size: 0.8rem;
    }
}

.repo-card {
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.repo-card:hover {
    transform: translateY(-4px) scale(1.02);
}

.repo-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.repo-stat {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    min-width: 0;
    flex: 1 1 auto;
}

.repo-stat i {
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

.repo-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.repo-actions .btn {
    flex: 1;
    min-flex: 120px;
}

@media (max-width: 480px) {
    .repo-actions {
        flex-direction: column;
    }
    
    .repo-actions .btn {
        width: 100%;
    }
}

/* File browser improvements */
.file-list {
    background: var(--bg-secondary);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.file-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    text-decoration: none;
    color: var(--text-primary);
}

.file-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateX(4px);
}

.file-item:last-child {
    border-bottom: none;
}

.file-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
    color: var(--accent-primary);
}

.file-name {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.file-size,
.file-date {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .file-item {
        padding: 12px 16px;
    }
    
    .file-meta {
        gap: 12px;
        font-size: 0.8rem;
    }
    
    .file-date {
        display: none;
    }
}

/* Status indicators with modern styling */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-success {
    background: rgba(48, 209, 88, 0.2);
    color: var(--accent-success);
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.status-warning {
    background: rgba(255, 159, 10, 0.2);
    color: var(--accent-warning);
    border: 1px solid rgba(255, 159, 10, 0.3);
}

.status-danger {
    background: rgba(255, 69, 58, 0.2);
    color: var(--accent-danger);
    border: 1px solid rgba(255, 69, 58, 0.3);
}

.status-info {
    background: rgba(0, 122, 255, 0.2);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 122, 255, 0.3);
}

/* Floating action button for mobile */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all var(--transition-smooth);
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.fab:active {
    transform: scale(0.95);
}

@media (min-width: 769px) {
    .fab {
        display: none;
    }
}

/* Loading states with modern animations */
.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-quaternary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-small);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Smooth page transitions */
.page-transition {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Modern scroll indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    transform-origin: left;
    z-index: 9999;
    transition: transform 0.1s ease-out;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}

/* Dark theme code highlighting adjustments */
pre[class*="language-"] {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    margin: 16px 0;
    padding: 20px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: var(--shadow-light);
}

code[class*="language-"] {
    background: transparent !important;
    color: var(--text-primary) !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
}

/* Repository type selection cards */
.repo-type-card {
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
}

.repo-type-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-medium);
}

.repo-type-card.selected {
    border-color: var(--accent-primary);
    background: rgba(0, 122, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}

.repo-type-card.selected .card-body {
    background: transparent;
}

/* Enhanced form styling for modals */
.form-label.fw-bold {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.form-text i {
    width: 14px;
    height: 14px;
}

/* Repository grid animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.repo-card {
    animation: slideInUp 0.5s ease-out;
}

.repo-card:nth-child(1) { animation-delay: 0.1s; }
.repo-card:nth-child(2) { animation-delay: 0.2s; }
.repo-card:nth-child(3) { animation-delay: 0.3s; }
.repo-card:nth-child(4) { animation-delay: 0.4s; }
.repo-card:nth-child(5) { animation-delay: 0.5s; }
.repo-card:nth-child(6) { animation-delay: 0.6s; }

/* Mobile touch improvements */
@media (max-width: 768px) {
    .repo-type-card {
        min-height: 100px;
    }
    
    .repo-type-card .card-body {
        padding: 20px 16px;
    }
    
    .modal-dialog.modal-lg {
        max-width: 95vw;
        margin: 12px auto;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 28px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
}

/* Enhanced notification styles */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    max-width: 400px;
    z-index: 9999;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    border: none;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#file-drop-zone {
    transition: all 0.3s ease;
    cursor: pointer;
}

#file-drop-zone:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color) !important;
}

#file-drop-zone.dragover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color) !important;
    transform: scale(1.02);
}

/* Language badges */
.language-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Git operation status */
.git-status {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* Statistics cards */
.stat-item {
    padding: 1rem;
}

.stat-item h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-item small {
    color: var(--text-muted);
    font-weight: 500;
}

/* File icons */
.file-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* Repository cards */
.repo-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.repo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Alert customizations */
.alert {
    border: 1px solid var(--border-color);
}

.alert-success {
    background-color: rgba(35, 134, 54, 0.1);
    color: #4ac26b;
    border-color: rgba(35, 134, 54, 0.3);
}

.alert-danger {
    background-color: rgba(248, 81, 73, 0.1);
    color: #ff7b72;
    border-color: rgba(248, 81, 73, 0.3);
}

.alert-warning {
    background-color: rgba(210, 153, 34, 0.1);
    color: #f0c674;
    border-color: rgba(210, 153, 34, 0.3);
}

.alert-info {
    background-color: rgba(31, 111, 235, 0.1);
    color: #79c0ff;
    border-color: rgba(31, 111, 235, 0.3);
}

/* Button customizations */
.btn-outline-primary {
    border-color: var(--info-color);
    color: var(--info-color);
}

.btn-outline-primary:hover {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

.btn-outline-success {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline-success:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Modal customizations */
.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* Form customizations */
.form-control {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-control:focus {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(35, 134, 54, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Dropdown customizations */
.dropdown-menu {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
}

/* Loading spinner */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* General layout */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Make buttons easier to tap */
    .btn {
        min-height: 44px; /* iOS recommended tap target */
        padding: 0.75rem 1rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
    
    /* Form controls */
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-control-lg {
        min-height: 50px;
        font-size: 18px;
    }
    
    /* Code display */
    pre[class*="language-"] {
        font-size: 0.75rem;
        padding: 0.75rem;
        overflow-x: auto;
    }
    
    /* Table responsive behavior */
    .table-responsive {
        border: none;
    }
    
    /* Navigation adjustments */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    /* File browser adjustments */
    .file-browser .list-group-item {
        padding: 1rem 0.75rem;
    }
    
    /* Hide unnecessary elements on small screens */
    .d-none-mobile {
        display: none !important;
    }
    
    /* Sticky navigation for mobile */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1020;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
    
    /* Stack buttons vertically on very small screens */
    .btn-group:not(.btn-group-vertical) .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Adjust breadcrumb for mobile */
    .breadcrumb {
        font-size: 0.875rem;
        padding: 0.5rem 0;
        margin-bottom: 0.5rem;
    }
}

/* Touch-friendly scrollbars on mobile */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }
    
    ::-webkit-scrollbar-thumb {
        border-radius: 6px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .dropdown,
    .modal {
        display: none !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        background-color: white !important;
    }
    
    pre[class*="language-"] {
        background-color: #f8f9fa !important;
        border: 1px solid #ddd !important;
    }
}
