/* Dashboard Specific Styles */
.dashboard-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-stats h3 {
    font-weight: 300;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Recent Activity */
.recent-activity {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding-left: 15px;
    padding-right: 15px;
}

.activity-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.activity-icon.upload {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.activity-icon.process {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.activity-icon.complete {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.activity-time {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.action-card {
    text-align: center;
    padding: 30px 20px;
    border: 2px dashed #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.action-card:hover {
    border-color: #007bff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.15);
    text-decoration: none;
    color: inherit;
}

.action-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.action-description {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
}

/* System Status */
.system-status {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.status-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    flex: 1;
    font-weight: 500;
}

.status-value {
    font-weight: 600;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.online {
    background: #d4edda;
    color: #155724;
}

.status-badge.offline {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

/* Progress Bars Custom */
.progress {
    background-color: #e9ecef;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Cards Enhancement */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.card:hover {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* Buttons Enhancement */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

/* Badges Enhancement */
.badge {
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 500;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-stats {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .activity-item {
        padding: 12px 0;
    }
    
    .action-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .action-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .dashboard-stats h3 {
        font-size: 1.3rem;
    }
    
    .stat-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .recent-activity,
    .quick-actions,
    .system-status {
        padding: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .recent-activity,
    .quick-actions,
    .system-status,
    .card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .activity-title {
        color: #e2e8f0;
    }
    
    .activity-item {
        border-bottom-color: #4a5568;
    }
    
    .activity-item:hover {
        background-color: #4a5568;
    }
    
    .action-card {
        border-color: #4a5568;
    }
    
    .status-item {
        border-bottom-color: #4a5568;
    }
}

/* Custom scrollbar for dashboard */
.dashboard-scroll {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.dashboard-scroll::-webkit-scrollbar {
    width: 6px;
}

.dashboard-scroll::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

.dashboard-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.dashboard-scroll::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Tombol Download di Manim Editor */
#downloadVideo {
    transition: all 0.3s ease;
}

#downloadVideo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Responsive untuk tombol download */
@media (max-width: 768px) {
    .card-header .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Video Size Toggle Buttons */
.btn-group .btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

.btn-group .btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
}

.btn-group .btn-check:checked + .btn-outline-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

/* Portrait video preview */
.video-portrait {
    max-width: 50% !important;
    max-height: 500px !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .manim-controls .btn-group {
        margin-top: 10px;
    }
    
    .video-portrait {
        max-width: 80% !important;
    }
}