/* 全局样式 */
:root {
    --primary-color: #007bff;
    --primary-light: #3498db;
    --primary-dark: #0056b3;
    --accent-color: #00e5ff;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #2a2a2a;
    --success-color: #00c853;
    --warning-color: #ffab00;
    --danger-color: #ff1744;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 123, 255, 0.1) 0%, rgba(0, 0, 0, 0) 90%);
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 0.8s ease-in-out;
}

.logo {
    margin-bottom: 1.5rem;
}

.logo img {
    max-width: 180px;
    height: auto;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-light), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* 测速按钮 */
.test-button {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    color: var(--text-light);
    border: none;
    border-radius: 20px;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.test-button:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.test-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.test-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

.test-button.testing {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-dark));
    animation: pulse-button 1.5s infinite;
}

@keyframes pulse-button {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.test-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.test-button:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* 主体内容 */
main {
    flex: 1;
}

.domains-container {
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 
                0 0 20px rgba(0, 123, 255, 0.2);
    animation: slideUp 0.5s ease-out forwards;
    border: 1px solid var(--border-color);
}

.domains-header {
    display: flex;
    padding: 1rem 1.5rem;
    background-color: rgba(0, 123, 255, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.domain-title {
    flex: 1;
    font-weight: bold;
}

.speed-title {
    width: 80px;
    text-align: center;
    font-weight: bold;
}

.domains-list {
    padding: 0.5rem 0;
}

.domain-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    gap: 6px;
}

.domain-item:last-child {
    border-bottom: none;
}

.domain-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.domain-link-container {
    flex: 1;
    display: flex;
    align-items: center;
}

.domain-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
    margin-right: 8px;
}

.domain-item:hover .domain-link {
    color: var(--primary-light);
}

.copy-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-left: 8px;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.copy-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.domain-speed {
    width: 80px;
    text-align: center;
    font-size: 0.9rem;
    border-radius: 20px;
    padding: 0.2rem 0.5rem;
}

.speed-fast {
    color: var(--success-color);
    background-color: rgba(0, 200, 83, 0.1);
}

.speed-medium {
    color: var(--warning-color);
    background-color: rgba(255, 171, 0, 0.1);
}

.speed-slow {
    color: var(--danger-color);
    background-color: rgba(255, 23, 68, 0.1);
}

.speed-testing {
    color: var(--text-muted);
    background-color: rgba(160, 160, 160, 0.1);
}

.loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    animation: pulse 1.5s infinite;
}

/* Toast提示 */
.toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
}

.toast-content::before {
    content: '✓';
    margin-right: 8px;
    color: var(--success-color);
    font-weight: bold;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 响应式设计 */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    .domain-item {
        padding: 1rem;
    }
    
    .domains-header {
        padding: 1rem;
    }
} 