body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Subtelne powtarzalne tło */
    background-color: #f0f0f0;
    background-image: radial-gradient(#cfcfcf 1px, transparent 1px);
    background-size: 20px 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.controls {
    background-color: #ffffff;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 10;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group label {
    font-weight: 500;
    color: #333;
}

.input-group input {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 80px;
}

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

button:hover {
    background-color: #005a9e;
}

.workspace {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
}

#module-container {
    /* Tło szachownica do wizualizacji przezroczystości - bardzo jasna */
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, #f7f7f7 25%, transparent 25%, transparent 75%, #f7f7f7 75%, #f7f7f7),
        linear-gradient(45deg, #f7f7f7 25%, transparent 25%, transparent 75%, #f7f7f7 75%, #f7f7f7);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;

    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: width 0.3s ease, height 0.3s ease;
    overflow: hidden; /* Zapobiega wylewaniu się zawartości */
    position: relative;
    
    /* Centrowanie zawartości */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 800px;
    height: 70%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    align-self: flex-end;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#html-code {
    width: 100%;
    flex: 1;
    margin: 15px 0;
    padding: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
    background-color: #fafafa;
}

#save-btn {
    align-self: flex-end;
}