/*
* Copyright (c) Sebastian Kucharczyk <kuchen@kekse.biz>
* https://kekse.biz/ https://github.com/kekse1/v4/
*/

.key
{
	--duration: 210;
	--duration-recolor: 600;
	--duration-rephase: 900;
	--duration-filter: 480;
	--duration-unset: 190;
}

div#module {
	touch-action: manipulation;
	flex-direction: column;
	display: flex;
	box-sizing: border-box;
	padding: 16px;
	margin: 8px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}

.display-container {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.display {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
    min-height: 100px;
    color: #00ff88;
    font-family: 'Intel One Mono', 'Source Code Pro', 'Fira Code', monospace;
    font-size: 1.2rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    max-height: 200px;
}

.keyboard {
    background: rgba(30, 30, 40, 0.95);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.keyboard-row {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.keyboard-row:last-child {
    margin-bottom: 0;
}

.key {
    background: linear-gradient(180deg, #4a4a5a, #2a2a3a);
    border: 1px solid #1a1a2a;
    border-radius: 8px;
    color: #e0e0ff;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin: 0 3px;
    flex: 1;
    max-width: 64px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.key:active, .key.active {
	font-weight: bold;
    background: linear-gradient(180deg, #6a6a7a, #4a4a5a);
    transform: translateY(2px) translateX(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(200, 230, 10, 0.92);
}

.key.special {
    background: linear-gradient(180deg, #5a3a6a, #3a2a4a);
}

.key.low
{
	opacity: 0.5;
}

.key.space {
    max-width: 300px;
}

.key.backspace {
    max-width: 96px;
}

.key.enter {
    max-width: 96px;
}

.key.tab {
    max-width: 80px;
}

.key.caps {
    max-width: 88px;
}

.key.shift {
    max-width: 96px;
}

.key.ctrl, .key.alt, .key.win, .key.fn {
    max-width: 80px;
}

/*.key-text {} */

.key-label {
    position: absolute;
    top: 3px;
    right: 6px;
    font-size: 1.2468rem;
    color: #a0a0c0;
    pointer-events: none;
}

.key-text {
	position: relative;
	font-size: 1.32rem;
	color: #a0a0c0;
	text-align: center;
	vertical-align: middle;
	pointer-events: none;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    color: white;
    font-size: 1.34rem;
}

@media (max-width: 768px) {
    .key {
	height: 40px;
	font-size: 0.8rem;
	max-width: 35px;
    }

    .key.space {
	max-width: 200px;
    }

    .key.backspace {
	max-width: 60px;
    }

    .key.enter {
	max-width: 70px;
    }

    .key.tab {
	max-width: 50px;
    }

    .key.caps {
	max-width: 60px;
    }

    .key.shift {
	max-width: 70px;
    }

    .key.ctrl, .key.alt, .key.win, .key.fn {
	max-width: 45px;
    }

    .key-label {
	font-size: 0.5rem;
	top: 1px;
	left: 2px;
    }
}

@media (max-width: 480px) {
    body {
	padding: 10px;
    }

    .header h1 {
	font-size: 1.4rem;
    }

    .key {
	height: 35px;
	font-size: 0.7rem;
	max-width: 30px;
    }

    .key.space {
	max-width: 150px;
    }

    .key.backspace {
	max-width: 50px;
    }

    .key.enter {
	max-width: 60px;
    }

    .key.tab {
	max-width: 40px;
    }

    .key.caps {
	max-width: 50px;
    }

    .key.shift {
	max-width: 60px;
    }

    .key.ctrl, .key.alt, .key.win, .key.fn {
	max-width: 35px;
    }
}

