:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --add-color: #4ade80;
    --remove-color: #f87171;
    --neutral-color: #e2e8f0;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
    /*padding: 20px;*/
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
}

.header-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px;
    padding: 30px 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card {
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease;
    margin-bottom: 25px;
    background-color: rgba(255, 255, 255, 0.95);
}

/*.card:hover {*/
/*    transform: translateY(-5px);*/
/*}*/

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 6px;
    border-bottom: none;
    font-weight: 600;
    font-size: 1.2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a55d5 0%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

.btn-outline-secondary {
    background: linear-gradient(135deg, #e6e9f0 0%, #eef1f5 100%);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
}

.btn-outline-secondary:hover {
    background: linear-gradient(135deg, #d8dbe3 0%, #e2e6ee 100%);
}

.text-container {
    position: relative;
    height: 400px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.6;
    white-space: normal;
    word-wrap: break-word;
    tab-size: 4;
    padding: 15px 15px 15px 30px;
}

.diff-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .diff-container {
        flex-direction: column;
    }
}

.diff-left, .diff-right {
    flex: 1;
    position: relative;
}

.diff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 15px;
    background: #f1f5f9;
    border-radius: 8px;
    font-weight: 600;
}

.diff-line {
    padding: 2px 5px;
    margin-bottom: 2px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    height: 25px;
}

.added {
    background-color: rgba(74, 222, 128, 0.2);
    border-left: 3px solid var(--add-color);
}

.removed {
    background-color: rgba(248, 113, 113, 0.2);
    border-left: 3px solid var(--remove-color);
    text-decoration: line-through;
}

.unchanged {
    color: #64748b;
}

.diff-indicator {
    position: absolute;
    left: -30px;
    width: 25px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    user-select: none;
    /*background-color: #ccc;*/
}

.diff-result {
    margin-top: 25px;
}

.legend {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-added {
    background-color: rgba(74, 222, 128, 0.3);
    border: 1px solid var(--add-color);
}

.legend-removed {
    background-color: rgba(248, 113, 113, 0.3);
    border: 1px solid var(--remove-color);
}

.line-numbers {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    padding: 15px 5px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    text-align: right;
    font-family: monospace;
    color: #94a3b8;
    overflow: hidden;
    user-select: none;
}

textarea {
    min-height: 300px;
    resize: vertical;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s ease;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre;
    overflow-x: auto;
    tab-size: 4;
}

textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
    outline: none;
}

.mode-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.mode-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
    background: #e2e8f0;
    border: none;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: var(--primary-color);
    color: white;
}

.feature-card {
    border-radius: 12px;
    padding: 25px;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

footer {
    text-align: center;
    padding: 30px 0 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

.highlight {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% {
        background-color: rgba(255, 234, 0, 0.4);
        transform: scale(1.02);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

.text-example {
    background: rgba(67, 97, 238, 0.05);
    border-radius: 12px;
    padding: 15px;
    font-size: 0.95rem;
    border-left: 4px solid var(--primary-color);
}

.tool-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}