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

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--google-ads-blue, #174ea6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Tab Styles */
.tab-button {
    border-bottom-color: transparent;
    color: #6b7280;
}

.tab-button:hover {
    color: #174ea6;
    border-bottom-color: #cbd5e1;
}

.tab-button.active {
    color: #174ea6;
    border-bottom-color: #174ea6;
}

.tab-content {
    animation: fadeIn 0.3s ease-out;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(23, 78, 166, 0.15);
    border-color: var(--google-ads-blue, #174ea6);
}

.card-hover {
    transition: all 0.3s ease;
}

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

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
}

.custom-table {
    border-collapse: separate;
    border-spacing: 0;
}

.custom-table thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.custom-table tbody tr {
    transition: background-color 0.2s ease;
}

.custom-table tbody tr:hover {
    background-color: #f8fafc;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-low {
    background-color: #dcfce7;
    color: #166534;
}

.badge-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-high {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-unknown {
    background-color: #f3f4f6;
    color: #6b7280;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
    
    .custom-table {
        font-size: 0.875rem;
    }
}

/* Google Ads Color Palette */
:root {
    --google-ads-blue: #174ea6;
    --google-ads-green: #0d652d;
    --google-ads-red: #a50e0e;
    --google-ads-yellow: #f29900;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--google-ads-blue) 0%, var(--google-ads-green) 50%, var(--google-ads-yellow) 100%);
}

.gradient-text {
    background: linear-gradient(135deg, var(--google-ads-blue) 0%, var(--google-ads-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Larger font sizes for better readability on mobile */
body {
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

input[name="timeRange"]:checked + div {
    font-weight: 600;
}

label:has(input[name="timeRange"]:checked) {
    border-color: var(--google-ads-blue, #174ea6) !important;
    background-color: #e8f0fe;
}

/* Minimum touch target size for mobile */
button, .btn, a.btn, input[type="submit"], input[type="button"] {
    min-height: 44px;
    min-width: 44px;
}

/* Improved button styles with Google Ads colors */
.btn-primary {
    background-color: var(--google-ads-blue, #174ea6);
}

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

.btn-success {
    background-color: var(--google-ads-green, #0d652d);
}

.btn-success:hover {
    background-color: #0f7534;
}

.btn-danger {
    background-color: var(--google-ads-red, #a50e0e);
}

.btn-danger:hover {
    background-color: #b91515;
}

.btn-warning {
    background-color: var(--google-ads-yellow, #f29900);
}

.btn-warning:hover {
    background-color: #ffa41a;
}