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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #d4d4d4;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: #64748b;
    font-size: 1.1rem;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 15px;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-toggle button {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #d4d4d4;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.view-toggle button:hover {
    background-color: #e2e8f0;
}

.view-toggle button.active {
    background-color: #0e639c;
    border-color: #0e639c;
    color: #ffffff;
}

.options {
    display: flex;
    gap: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0e639c;
    cursor: pointer;
}

.btn-primary, .btn-secondary {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0e639c;
    color: #ffffff;
    width: 100%;
    margin: 20px 0;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background-color: #1177bb;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #d4d4d4;
}

.btn-secondary:hover {
    background-color: #4e4e52;
}

.input-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 10px;
}

.input-panel {
    background-color: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #edf5ff;
    border-bottom: 1px solid #e2e8f0;
}

.input-header h3 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
}

.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background-color: #0e639c;
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.file-label:hover {
    background-color: #1177bb;
}

textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: none;
    background-color: #ffffff;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: vertical;
    outline: none;
}

textarea::placeholder {
    color: #6e6e6e;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid;
}

.stat-item.added {
    border-left-color: #4caf50;
}

.stat-item.removed {
    border-left-color: #f44336;
}

.stat-item.unchanged {
    border-left-color: #9e9e9e;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
}

.result-section {
    background-color: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #edf5ff;
    border-bottom: 1px solid #e2e8f0;
}

.result-header h3 {
    color: #ffffff;
}

.result-content {
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
}

.diff-table {
    width: 100%;
    border-collapse: collapse;
}

.diff-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.diff-table .line-number {
    width: 50px;
    text-align: right;
    color: #6e6e6e;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    user-select: none;
}

.diff-table .line-content {
    white-space: pre-wrap;
    word-break: break-all;
}

.diff-table .added {
    background-color: rgba(76, 175, 80, 0.15);
}

.diff-table .added .line-content {
    color: #4caf50;
}

.diff-table .removed {
    background-color: rgba(244, 67, 54, 0.15);
}

.diff-table .removed .line-content {
    color: #f44336;
}

.diff-table .unchanged {
    background-color: transparent;
}

.diff-table .marker {
    width: 30px;
    text-align: center;
    font-weight: bold;
    user-select: none;
}

.diff-table .added .marker {
    color: #4caf50;
}

.diff-table .removed .marker {
    color: #f44336;
}

.inline-view .diff-table .line-number {
    width: 50px;
}

.inline-view .diff-table .marker {
    width: 25px;
}

.empty-line {
    color: #6e6e6e;
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle {
        justify-content: center;
    }

    .input-section {
        grid-template-columns: 1fr;
    }

    textarea {
        height: 200px;
    }

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

    .diff-table {
        font-size: 12px;
    }

    .diff-table td {
        padding: 6px 8px;
    }

    .diff-table .line-number {
        width: 40px;
    }
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #ffffff;
}

::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e4e52;
}
