/* ========================================
   全局样式和CSS变量
======================================== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(148, 163, 184, 0.2);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e0e7ff 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   背景装饰
======================================== */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15), transparent);
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.circle-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.15), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ========================================
   容器
======================================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   头部
======================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-color));
    animation: logoFloat 3s ease-in-out infinite, logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-5deg);
    }
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 10px var(--primary-color));
    }
    100% {
        filter: drop-shadow(0 0 20px var(--primary-color)) drop-shadow(0 0 30px var(--primary-light));
    }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-stats {
    display: flex;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   英雄区域
======================================== */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light), var(--secondary-color), var(--primary-color));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 4s ease-in-out infinite, textFloat 3s ease-in-out infinite;
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes textFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   搜索区域
======================================== */
.search-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.search-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.search-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 30px -5px rgba(99, 102, 241, 0.2);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--text-muted);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.search-input {
    flex: 1;
    background: #ffffff;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.search-btn:active {
    transform: translateY(0);
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* ========================================
   DNS类型按钮
======================================== */
.dns-types {
    margin-bottom: 1.5rem;
}

.type-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.type-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.type-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.type-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.type-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.type-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.type-btn.active .type-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   快速示例
======================================== */
.quick-examples {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.examples-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.example-tag {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.example-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-light);
}

/* ========================================
   加载动画
======================================== */
.loading-container {
    text-align: center;
    padding: 3rem;
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========================================
   结果展示
======================================== */
.results-section {
    animation: fadeInUp 0.6s ease-out;
    margin-bottom: 3rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.results-meta {
    display: flex;
    gap: 0.75rem;
}

.domain-name {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--primary-light);
}

.record-type {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: white;
}

.results-content {
    display: grid;
    gap: 1rem;
}

.result-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    animation: slideInUp 0.4s ease-out backwards;
}

.result-card:nth-child(n) {
    animation-delay: calc(0.05s * var(--i));
}

.result-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.result-row:last-child {
    margin-bottom: 0;
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.result-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-family: 'Monaco', 'Courier New', monospace;
    word-break: break-all;
    text-align: right;
}

.copy-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: var(--primary-light);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 0.5rem;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
}

.no-results {
    text-align: center;
    padding: 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.no-results-text {
    color: var(--text-secondary);
}

/* ========================================
   历史记录
======================================== */
.history-section {
    animation: fadeInUp 0.8s ease-out;
    margin-bottom: 3rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.history-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.history-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-color);
}

.clear-history-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--error-color);
    cursor: pointer;
    transition: var(--transition);
}

.clear-history-btn:hover {
    background: var(--error-color);
    color: white;
}

.history-list {
    display: grid;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.history-domain {
    font-weight: 600;
    color: var(--text-primary);
}

.history-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.history-type {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--primary-light);
}

.history-time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   功能特性
======================================== */
.features-section {
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========================================
   页脚
======================================== */
.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ========================================
   响应式设计
======================================== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-card {
        padding: 1.5rem;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .type-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .results-meta {
        flex-direction: column;
        width: 100%;
    }

    .domain-name,
    .record-type {
        width: 100%;
        text-align: center;
    }

    .result-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .result-value {
        text-align: left;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .history-meta {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.125rem;
    }

    .header-stats {
        display: none;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .type-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-examples {
        flex-direction: column;
        align-items: flex-start;
    }
}

