/* Custom styles for Google Drive Sharing Checker */

:root {
    --google-blue: #4285f4;
    --google-red: #ea4335;
    --google-yellow: #fbbc04;
    --google-green: #34a853;
}

/* General */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    transition: background-color 0.2s;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Cards */
.card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* File list specific */
.file-item .card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-item .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.file-item .card.border-warning {
    border-left: 4px solid var(--bs-warning);
}

/* Badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline-primary:hover,
.btn-outline-info:hover,
.btn-outline-danger:hover {
    transform: translateY(-1px);
}

/* Analytics page */
.analytics-card {
    border-radius: 1rem;
    transition: transform 0.2s;
}

.analytics-card:hover {
    transform: scale(1.02);
}

/* Login page */
.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Sharing type colors */
.sharing-private {
    color: var(--google-green);
    background-color: rgba(52, 168, 83, 0.1);
}

.sharing-shared {
    color: var(--google-yellow);
    background-color: rgba(251, 188, 4, 0.1);
}

.sharing-public {
    color: var(--google-red);
    background-color: rgba(234, 67, 53, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .card-body .row .col-auto {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* File type icons */
.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    margin-right: 0.75rem;
}

.file-icon.folder {
    background-color: rgba(66, 133, 244, 0.1);
    color: var(--google-blue);
}

.file-icon.document {
    background-color: rgba(52, 168, 83, 0.1);
    color: var(--google-green);
}

.file-icon.image {
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--google-red);
}

.file-icon.generic {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-title {
    font-size: 2.5rem;
    color: #202124;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    color: #5f6368;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4285f4, #1a73e8, #4285f4);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1a73e8;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #5f6368;
    font-size: 1.1rem;
}

.action-section {
    text-align: center;
    margin: 3rem 0;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 2px solid;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn.primary {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.action-btn.primary:hover {
    background: #1557b0;
    border-color: #1557b0;
}

.action-btn.secondary {
    background: white;
    color: #1a73e8;
    border-color: #1a73e8;
}

.action-btn.secondary:hover {
    background: #f8f9fa;
}

.refresh-section {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 2rem;
}

.refresh-btn {
    background: #34a853;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn:hover {
    background: #2d8f47;
}

.refresh-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

.last-updated {
    color: #80868b;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.privacy-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e8f0fe;
    border-radius: 16px;
    color: #1a73e8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Dashboard specific body background */
body.dashboard-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
}

/* Loading Page Styles */
.loading-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.loading-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.loading-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4285f4, transparent);
    animation: shimmer 2s infinite;
}

.loading-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(45deg, #4285f4, #1a73e8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
}

.loading-icon::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid rgba(66, 133, 244, 0.3);
    border-top: 3px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.main-title {
    font-size: 2rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 0.5rem;
}

.status-text {
    font-size: 1.1rem;
    color: #5f6368;
    margin: 1rem 0 2rem;
    line-height: 1.5;
}

.progress-container {
    margin: 2rem 0;
    background: #f1f3f4;
    border-radius: 12px;
    overflow: hidden;
    height: 12px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4285f4, #1a73e8, #4285f4);
    background-size: 200% 100%;
    animation: progressGlow 2s ease-in-out infinite;
    border-radius: 12px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a73e8;
    display: block;
}

.stat-item .stat-label {
    font-size: 0.875rem;
    color: #5f6368;
    margin-top: 0.25rem;
}

.details-text {
    color: #80868b;
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.error-container {
    background: linear-gradient(135deg, #fce8e6, #fdf2f2);
    border: 2px solid #f28b82;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.error-title {
    color: #d93025;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    color: #5f6368;
    line-height: 1.5;
}

/* Enhanced refresh button for loading page */
.loading-container .refresh-btn {
    background: linear-gradient(45deg, #1a73e8, #4285f4);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.loading-container .refresh-btn:hover {
    background: linear-gradient(45deg, #1557b0, #1a73e8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

.loading-container .refresh-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Enhanced animations */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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