body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.left-panel {
    flex: 0 0 300px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.right-panel {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    grid-column: 1 / -1;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

#titleInput {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

#wordInput {
    width: 100%;
    height: 200px;
    padding: 10px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

button {
    padding: 12px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.grid-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.word-grid {
    display: inline-grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2px;
    background-color: #333;
    padding: 10px;
    border-radius: 8px;
}

.grid-cell {
    width: 40px;
    height: 40px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    user-select: none;
}

.word-legend {
    margin-top: 20px;
}

.word-legend h3 {
    color: #333;
    margin-bottom: 10px;
}

.word-legend-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.word-legend-item {
    background-color: #f8f9fa;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    font-size: 14px;
}

.instructions {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
    font-size: 14px;
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .left-panel {
        display: none !important;
    }
    
    .container {
        display: block;
        max-width: none;
    }
    
    .right-panel {
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    .grid-container {
        margin-bottom: 30px;
    }
    
    .word-grid {
        border-radius: 0;
    }
    
    h1 {
        margin-bottom: 20px;
    }
}