body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.keyboard-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.keyboard-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c3e50;
}

.keyboard {
    display: inline-block;
    padding: 15px;
    background: #e8e8e8;
    border-radius: 8px;
}

.row {
    display: flex;
    margin-bottom: 8px;
    gap: 6px;
    position: relative;
}

.row-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    margin-bottom: 8px;
}

.row-wrapper .row {
    margin-bottom: 0;
}

.key {
    background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
    border: 2px solid #ccc;
    border-radius: 5px;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
    position: relative;
}

.key.split {
    display: flex;
    flex-direction: row;
    padding: 0;
    overflow: hidden;
    min-width: 70px;
}

.key-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4px 2px;
    gap: 2px;
}

.key-half.us {
    background: linear-gradient(180deg, #e3f2fd 0%, #90caf9 100%);
    border-right: 2px solid #999;
}

.key-full.us {
    background: linear-gradient(180deg, #e3f2fd 0%, #90caf9 100%);
}

.key-half.swedish {
    background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
}

.half-label {
    font-size: 8px;
    color: #666;
    font-weight: bold;
    text-transform: uppercase;
}

.char-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.char-shift {
    font-size: 10px;
    color: #666;
}

.char-main {
    font-size: 14px;
    font-weight: bold;
    color: #000;
}

.key.tab {
    min-width: 105px;
}

.key.caps {
    min-width: 120px;
}

.key.shift-left {
    min-width: 90px;
}

.key.shift-right {
    min-width: 160px;
}

.key.backspace {
    min-width: 105px;
}

.key.enter {
    min-width: 52px;
    height: 118px;
    position: absolute;
    right: 0;
    top: 0;
}

.key.ctrl {
    min-width: 132px;
}

.key.ctrl-right {
    min-width: 105px;
}

.key.win {
    min-width: 88px;
}

.key.alt-left {
    min-width: 88px;
}

.key.space {
    min-width: 394px;
}

.key.altgr {
    min-width: 88px;
}

.key-top {
    font-size: 11px;
    color: #666;
}

.key-main {
    font-size: 16px;
    font-weight: bold;
    color: #000;
}

.key-label {
    font-size: 9px;
    color: #999;
    margin-top: 2px;
}

.legend {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-box {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 2px solid #ccc;
}

.legend-box.us {
    background: linear-gradient(180deg, #e3f2fd 0%, #90caf9 100%);
}

.legend-box.swedish {
    background: linear-gradient(180deg, #fff 0%, #f5f5f5 100%);
}

.note {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    border-left: 4px solid #2196F3;
}

.note strong {
    color: #1976D2;
}

.comparison-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.comparison-table h2 {
    margin-top: 0;
    color: #2c3e50;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.char {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

.kbd {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin: 0 2px;
}

@media print {
    body {
        max-width: 100%;
        padding: 10px;
        background: white;
    }

    @page {
        size: A4 landscape;
        margin: 15mm;
    }

    .comparison-table {
        display: none !important;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .subtitle {
        font-size: 12px;
        margin-bottom: 10px;
        display: none;
    }

    .keyboard-container {
        box-shadow: none;
        margin-bottom: 10px;
        page-break-inside: avoid;
    }

    .keyboard-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .keyboard {
        padding: 10px;
        transform: scale(0.95);
        transform-origin: top left;
    }

    .legend {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .note {
        font-size: 11px;
        padding: 10px;
        page-break-inside: avoid;
    }
}
