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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #24292e;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.comparison-methods {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.method-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.method-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.method-btn.active {
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.comparison-area {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    backdrop-filter: blur(10px);
}

.method-content {
    display: none;
}

.method-content.active {
    display: block;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.input-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.input-group textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    resize: vertical;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.input-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.compare-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.compare-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.result-area {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    display: none;
    backdrop-filter: blur(10px);
}

.result-area.active {
    display: block;
}

.result-area h2 {
    margin-bottom: 20px;
    color: #ffffff;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.diff-stats {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.stat-item {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.stat-item.added {
    background: rgba(40, 167, 69, 0.2);
    color: #ffffff;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.stat-item.removed {
    background: rgba(215, 58, 73, 0.2);
    color: #ffffff;
    border: 1px solid rgba(215, 58, 73, 0.3);
}

/* Diff 样式 */
.diff-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.diff-table th,
.diff-table td {
    padding: 5px 10px;
    text-align: left;
    vertical-align: top;
    border: none;
}

.diff-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    user-select: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px;
}

.diff-table th:first-child,
.diff-table th:nth-child(2) {
    width: 50px;
}

.diff-table th:nth-child(3) {
    width: auto;
}

.diff-line {
    background: transparent;
}

.diff-line.add {
    background: rgba(40, 167, 69, 0.1);
}

.diff-line.remove {
    background: rgba(215, 58, 73, 0.1);
}

.diff-line.equal {
    background: rgba(255, 255, 255, 0.05);
}

.diff-line.add .line-content::before {
    content: "+ ";
    color: #28a745;
    font-weight: bold;
}

.diff-line.remove .line-content::before {
    content: "- ";
    color: #d73a49;
    font-weight: bold;
}

.diff-line.equal .line-content::before {
    content: "  ";
}

.line-number {
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    user-select: none;
    padding-right: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.line-content {
    white-space: pre-wrap;
    word-break: break-all;
    padding-left: 10px;
    line-height: 1.4;
    background: transparent;
}

.no-diff {
    text-align: center;
    padding: 40px;
    color: #586069;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .comparison-methods {
        flex-direction: column;
        gap: 10px;
    }
    
    .method-btn {
        width: 100%;
        padding: 12px 16px;
    }
    
    .diff-table {
        font-size: 0.8rem;
    }
    
    .diff-table th:first-child,
    .diff-table th:nth-child(2) {
        width: 40px;
    }
}