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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
}

h1 {
    font-size: 24px;
    margin-bottom: 15px;
}

.controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-size: 14px;
}

.control-group input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

button {
    padding: 6px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

button:hover {
    background: #2980b9;
}

#clear-btn {
    background: #e74c3c;
}

#clear-btn:hover {
    background: #c0392b;
}

main {
    padding: 20px;
}

.instructions {
    background: #ecf0f1;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.instructions p {
    font-size: 13px;
    color: #555;
}

.tab-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.4;
    background: #fafafa;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    min-height: 300px;
    white-space: pre;
    overflow-x: auto;
    position: relative;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.tab-display:focus {
    border-color: #3498db;
}

.tab-line {
    display: block;
}

.column {
    display: inline;
    position: relative;
}

.column.current {
    background: rgba(52, 152, 219, 0.2);
    outline: 1px solid rgba(52, 152, 219, 0.5);
}

#clipboard-helper {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}