/* 基础样式重置 */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --text-color: #2b2d42;
    --light-text: #6c757d;
    --background: #f8f9fa;
    --border-color: #e9ecef;
    --success: #2ecc71;
    --warning: #f39c12;
    --error: #e74c3c;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

.dstg-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--shadow);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.dstg-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.dstg-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--primary-color);
}

.dstg-header h1 {
    color: var(--text-color);
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.dstg-header h1 i {
    color: var(--primary-color);
    font-size: 2rem;
}

.dstg-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.dstg-search-box {
    position: relative;
    margin: 2.5rem 0;
}

.dstg-input-group {
    display: flex;
    gap: 15px;
}

.dstg-input {
    flex: 1;
    padding: 1.2rem 1.8rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    font-size: 1.1rem;
    transition: var(--transition);
    background: var(--background);
}

.dstg-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
    background: #ffffff;
}

.dstg-search-btn {
    padding: 1.2rem 2.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.dstg-search-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.dstg-search-btn:disabled {
    background: var(--light-text);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dstg-instruction {
    background: var(--background);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.dstg-instruction h3 {
    color: var(--text-color);
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dstg-instruction h3 i {
    color: var(--primary-color);
}

.dstg-instruction ul {
    list-style: none;
}

.dstg-instruction li {
    padding: 0.8rem 0;
    display: flex;
    align-items: start;
    gap: 0.8rem;
    color: var(--light-text);
    font-size: 1.05rem;
}

.dstg-instruction li i {
    color: var(--success);
    margin-top: 3px;
}

.dstg-counter {
    text-align: center;
    padding: 1.2rem;
    background: var(--background);
    border-radius: 15px;
    margin: 1.5rem 0;
    font-size: 1rem;
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dstg-counter i {
    color: var(--primary-color);
}

.dstg-thinking {
    padding: 2rem;
    background: var(--background);
    border-radius: 15px;
    margin: 2rem 0;
    display: none;
    border: 1px solid var(--border-color);
}

.dstg-thinking > p {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.thinking-process {
    margin-top: 1.5rem;
    padding-left: 2rem;
    border-left: 3px solid var(--primary-color);
}

.thinking-step {
    margin: 1rem 0;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
}

.thinking-step i {
    color: var(--primary-color);
}

.dstg-results {
    margin-top: 2.5rem;
}

.dstg-title-item {
    background: white;
    padding: 2rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    animation: fadeInUp 0.6s ease;
    transition: var(--transition);
}

.dstg-title-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.title-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.title-number {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.title-content {
    flex: 1;
}

.title-text {
    font-size: 1.3rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.title-analysis {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 10px;
}

.analysis-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.analysis-content {
    color: var(--light-text);
    line-height: 1.6;
}

.dstg-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.dstg-footer p {
    color: var(--light-text);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dstg-footer i {
    color: var(--warning);
}

.dstg-error {
    background: var(--error);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.spin {
    animation: spin 1s linear infinite;
}

/* 响应式布局优化 */
@media (max-width: 768px) {
    .dstg-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .dstg-header h1 {
        font-size: 2rem;
    }

    .dstg-input-group {
        flex-direction: column;
    }

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

    .dstg-instruction,
    .dstg-thinking,
    .dstg-title-item {
        padding: 1.5rem;
    }

    .title-text {
        font-size: 1.1rem;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e9ecef;
        --light-text: #adb5bd;
        --background: #212529;
        --border-color: #343a40;
    }

    .dstg-container {
        background: #2b2d42;
    }

    .dstg-input {
        background: var(--background);
        color: var(--text-color);
    }

    .dstg-title-item {
        background: var(--background);
    }
}