/* Glass effect for cards */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.4s ease;
}

.glass-card-extended {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.glass-card-extended:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Table styles */
#summaryTable {
    border-radius: 12px;
    overflow: hidden;
}

#summaryTable thead tr {
    background: linear-gradient(to right, #3b82f6, #6366f1);
}

#summaryTable tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

#summaryTable tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Table row hover effect */
.table-row-hover:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Pulse animation for fetch button */
@keyframes pulse-slow {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.animate-pulse-slow {
    animation: pulse-slow 2s ease-in-out infinite;
}

/* Toggle switch styles */
.toggle-container {
    display: inline-block;
    position: relative;
    width: 110px;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    width: 110px;
    height: 44px;
    background: linear-gradient(to right, #e5e7eb, #d1d5db);
    border-radius: 100px;
    position: relative;
    transition: background-color 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-input:checked + .toggle-label {
    background: linear-gradient(to right, #3b82f6, #6366f1);
}

.toggle-button {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 44px;
    height: 40px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.toggle-input:checked + .toggle-label .toggle-button {
    transform: translateX(62px);
}

.toggle-text {
    position: relative;
    z-index: 1;
    font-weight: 600;
    font-size: 14px;
    padding: 0 14px;
    transition: color 0.3s;
}

.toggle-text-left {
    color: #6b7280;
}

.toggle-text-right {
    color: white;
}

.toggle-input:checked + .toggle-label .toggle-text-left {
    color: white;
}

.toggle-input:checked + .toggle-label .toggle-text-right {
    color: #6b7280;
}

/* Spinner animation */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pie Chart Styles */
.pie-chart-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#summaryChart {
    display: block;
    position: relative;
    width: 100% !important;
    height: 100% !important;
    padding: 15px;
    box-sizing: border-box;
}

.pie-chart-container:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.chart-boundary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
    z-index: 10;
}

/* Platform-specific header colors */
.bg-youtube-header {
    background: linear-gradient(to right, #dc2626, #b91c1c) !important;
}

.bg-x-header {
    background: linear-gradient(to right, #000000, #222222) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #summaryTable {
        width: 100%;
    }
    
    .pie-chart-container {
        width: 280px;
        height: 280px;
    }
    
    .toggle-label {
        width: 100px;
        height: 40px;
    }
    
    .toggle-button {
        width: 36px;
        height: 36px;
    }
    
    .toggle-input:checked + .toggle-label .toggle-button {
        transform: translateX(60px);
    }
}