/* Subject Detail Styles with Blue/Green/White/Orange Theme */

/* Header */
.subject-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    position: relative;
    overflow: hidden;
}

.subject-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="5" y="5" width="30" height="40" fill="rgba(255,255,255,0.05)" rx="5"/><rect x="40" y="15" width="25" height="30" fill="rgba(255,255,255,0.08)" rx="3"/><rect x="70" y="10" width="25" height="35" fill="rgba(255,255,255,0.05)" rx="4"/></svg>');
    opacity: 0.3;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.6);
    content: ">";
}

.breadcrumb-item a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-white) !important;
}

.subject-stats {
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

/* Section Titles */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* Subject Overview */
.subject-overview {
    margin-bottom: 3rem;
}

.overview-card {
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.overview-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.overview-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.overview-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
}

.overview-icon.bg-success {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
}

.overview-icon.bg-warning {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
}

.overview-icon.bg-orange {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--accent-orange) 100%);
}

.overview-content h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.overview-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Quick Actions Card */
.quick-actions-card {
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 2rem;
}

.quick-actions-card h5 {
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 0.75rem;
}

.year-indicator {
    background: var(--light-background);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

/* Topic Cards */
.topics-section {
    margin-bottom: 3rem;
}

.topic-card {
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
}

.topic-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.topic-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border-color: var(--primary-blue);
}

.topic-header {
    background: linear-gradient(135deg, var(--light-background) 0%, white 100%);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: between;
    align-items: center;
}

.topic-number {
    background: var(--primary-blue);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.premium-badge {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.topic-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topic-title {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.topic-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

.topic-stats {
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-item i {
    width: 16px;
    flex-shrink: 0;
}

.difficulty-distribution {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.difficulty-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    color: white;
}

.difficulty-badge.easy {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
}

.difficulty-badge.medium {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
}

.difficulty-badge.hard {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.topic-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--light-gray);
    background: var(--light-background);
}

/* Recent Activity */
.recent-activity {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.activity-timeline {
    position: relative;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-blue), var(--primary-green));
    opacity: 0.3;
}

.activity-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    margin-left: 2rem;
}

.activity-item:not(:last-child) {
    border-bottom: 1px solid var(--light-gray);
}

.activity-marker {
    position: absolute;
    left: -2.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

.activity-marker.bg-success {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
}

.activity-marker.bg-warning {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
}

.activity-marker.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.activity-content {
    flex: 1;
}

.activity-header {
    display: flex;
    justify-content: between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.activity-header h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
}

.activity-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.score-badge.bg-success {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
}

.score-badge.bg-warning {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
}

.score-badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.activity-action {
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    background: var(--light-background);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.empty-state i {
    opacity: 0.5;
}

/* Button Styles */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(34, 139, 202, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    box-shadow: 0 6px 20px rgba(34, 139, 202, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    border-color: var(--primary-green);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--secondary-green) 0%, var(--primary-green) 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    border-color: var(--accent-gold);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-gold) 100%);
    color: var(--text-dark);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

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

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

.btn-outline-primary {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

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

/* Badge Styles */
.badge {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 15px;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .subject-header {
        text-align: center;
    }
    
    .subject-stats {
        margin-top: 1rem;
    }
    
    .overview-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .quick-actions-card {
        position: static;
        margin-top: 2rem;
    }
    
    .topic-card {
        margin-bottom: 1.5rem;
    }
    
    .activity-timeline {
        padding-left: 0;
    }
    
    .activity-timeline::before {
        left: 0.5rem;
    }
    
    .activity-item {
        margin-left: 1.5rem;
    }
    
    .activity-marker {
        left: -2rem;
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.7rem;
    }
    
    .activity-header {
        flex-direction: column;
        align-items: start;
    }
    
    .activity-details {
        flex-direction: column;
        align-items: start;
        gap: 0.5rem;
    }
}

/* Animation for topic cards */
.topic-card {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Custom scrollbar */
.quick-actions-card::-webkit-scrollbar {
    width: 4px;
}

.quick-actions-card::-webkit-scrollbar-track {
    background: var(--light-background);
    border-radius: 2px;
}

.quick-actions-card::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 2px;
}

.quick-actions-card::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}
