/* TikTok Style - Modern Dark Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --tiktok-cyan: #25F4EE;
    --tiktok-red: #FE2C55;
    --dark-bg: #000000;
    --dark-surface: #121212;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #000000, #121212);
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(37, 244, 238, 0.15), transparent 30%),
                radial-gradient(circle at 70% 70%, rgba(254, 44, 85, 0.15), transparent 30%);
    z-index: -1;
    animation: pulse 8s infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.5;
    }
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    z-index: 1;
}

.detection-box {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.logo-text {
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 30px;
    background: linear-gradient(90deg, var(--tiktok-cyan), var(--tiktok-red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(37, 244, 238, 0.3);
}

.loading-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--tiktok-cyan);
    border-bottom-color: var(--tiktok-red);
    animation: spin 1.5s linear infinite;
}

.loading-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 20px var(--tiktok-cyan), 0 0 40px var(--tiktok-red);
    opacity: 0.5;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {
    0% {
        opacity: 0.3;
        box-shadow: 0 0 10px var(--tiktok-cyan), 0 0 20px var(--tiktok-red);
    }
    100% {
        opacity: 0.7;
        box-shadow: 0 0 20px var(--tiktok-cyan), 0 0 40px var(--tiktok-red);
    }
}

#domains-status {
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
    color: var(--text-secondary);
}

.domain-item {
    margin: 8px 0;
    padding: 12px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.domain-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.success {
    color: var(--tiktok-cyan);
}

.failure {
    color: var(--tiktok-red);
}

.pending {
    color: var(--text-secondary);
}

h1 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(90deg, var(--tiktok-cyan), var(--tiktok-red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.error-container {
    text-align: center;
}

.retry-button {
    background: linear-gradient(90deg, var(--tiktok-cyan), var(--tiktok-red));
    border: none;
    border-radius: 24px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(254, 44, 85, 0.3);
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(254, 44, 85, 0.5);
}

.retry-button:active {
    transform: translateY(1px);
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .detection-box {
        padding: 30px 20px;
    }
    
    .logo-text {
        font-size: 24px;
    }
}

/* Admin Page Styles */
.admin-container {
    max-width: 900px;
}

.status-box {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 30px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-header h1 {
    margin-bottom: 0;
}

#refresh-btn {
    margin-top: 0;
    padding: 10px 24px;
    font-size: 14px;
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.status-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    color: var(--text-secondary);
}

.status-table th, .status-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-table th {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-table td a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.status-table td a:hover {
    color: var(--tiktok-cyan);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--dark-bg);
}

.status-ok {
    background-color: #25F4EE; /* Cyan */
    box-shadow: 0 0 10px rgba(37, 244, 238, 0.5);
}

.status-unsafe {
    background-color: #FFC107; /* Amber */
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.status-down {
    background-color: #FE2C55; /* Red */
    box-shadow: 0 0 10px rgba(254, 44, 85, 0.5);
}

.loading-container-admin {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.error-text {
    text-align: center;
    padding: 50px;
    font-size: 16px;
    color: var(--tiktok-red);
}

/* New Card Layout Styles */
#status-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.status-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Card border colors based on status */
.status-card.status-ok {
    border-left-color: var(--tiktok-cyan);
}
.status-card.status-unsafe {
    border-left-color: #FFC107; /* Amber */
}
.status-card.status-down {
    border-left-color: var(--tiktok-red);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.card-status-icon {
    font-size: 20px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.status-card.status-ok .card-status-icon { color: var(--tiktok-cyan); }
.status-card.status-unsafe .card-status-icon { color: #FFC107; }
.status-card.status-down .card-status-icon { color: var(--tiktok-red); }

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-header .status-badge {
    flex-shrink: 0;
}

.card-body {
    margin-bottom: 20px;
}

.card-url {
    font-size: 14px;
    color: var(--text-secondary);
    word-break: break-all;
    margin: 0;
}

.card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
}

.card-latency-label {
    color: var(--text-secondary);
}

.card-latency-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
} 