* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: monospace;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
}
.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}
.container:has(.writing-screen:not(.hidden)) {
    max-width: 1200px;
}
.setup-screen, .writing-screen {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.complete-screen {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}
.setup-screen h1, .complete-screen h1 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}
.setup-screen p {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}
.time-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.mode-selector {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
    justify-content: center;
}
.mode-label {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #666;
    transition: 0.3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.time-btn {
    padding: 10px 20px;
    border: 1px solid #666;
    background: white;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s;
}
.time-btn:hover {
    background: #666;
    color: white;
}
.writing-screen {
    position: relative;
    min-height: 500px;
    padding: 0;
    overflow: hidden;
}
.red-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0);
    pointer-events: none;
    transition: background 0.3s;
    z-index: 1;
}
#notepad {
    width: 100%;
    height: 500px;
    padding: 40px;
    padding-top: 50px;
    border: none;
    outline: none;
    font-family: monospace;
    font-size: 16px;
    resize: none;
    position: relative;
    z-index: 0;
    background: transparent;
}
.timer-display {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2;
}
.style-options {
    display: flex;
    gap: 15px;
    margin: 20px 0;

}
.style-btn {
    padding: 8px 16px;
    border: 1px solid #666;
    background: white;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s;
}
.style-btn:hover, .style-btn.active {
    background: #666;
    color: white;
}
.output-text {
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
    min-height: 200px;
    white-space: pre-wrap;
    font-family: monospace;
}
.action-btn {
    padding: 8px 20px;
    background: #666;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    margin-right: 10px;
    margin-top: 5px;
}
.action-btn:hover {
    background: #444;
}
.api-section {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.api-section p {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
}
.api-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.hidden {
    display: none;
}
.domain-expand {
    display: inline-block;
    position: relative;
}
.domain-expand::after {
    content: 'work';
    transition: all 0.3s ease;
}
.domain-expand:hover::after {
    content: 'appx.work';
}
