body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    padding: 20px;
    margin: 0;
    line-height: 1.6;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8em;
}

.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.tool {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 15px;
}

.tool:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.tool h2 {
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.generate-btn,
#base64-mode {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

#base64-mode:hover {
    background-color: #45a049;
}

#base64-mode:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(72, 239, 102, 0.5);
}

.generate-btn:hover {
    background-color: #45a049;
}

.input-field,
.output-field {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

.output {
    margin-top: 20px;
    font-size: 1em;
    color: #333;
    padding: 10px;
    background: #f7f7f7;
    border-radius: 4px;
    border: 1px solid #ddd;
    word-wrap: break-word;
    min-height: 40px;
}

textarea {
    resize: none;
}

.copy-icon {
    position: relative;
    right: 10px;
    top: 10px;
    font-size: 18px;
    cursor: pointer;
    color: #007BFF;
    transition: transform 0.2s ease, color 0.2s ease;
}

.copy-icon:hover {
    transform: scale(1.2);
    color: #0056b3;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#password_length {
    width: auto;
    padding: 5px;
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .tools-container {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .tool {
        margin-bottom: 20px;
    }
}
