/* Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6; /* Light, slightly cool gray */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

header h1 {
    color: #2c3e50; /* Darker blue-gray */
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
    font-weight: 600;
}

/* Form Elements Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e; /* Slightly lighter blue-gray */
}

.form-group label.effective-label {
    font-style: italic;
    color: #7f8c8d; /* Muted gray for read-only hint */
}

.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdc3c7; /* Light gray border */
    border-radius: 6px;
    font-size: 1em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace; /* Monospace for char sets */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[type="number"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db; /* Blue focus */
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea#effective-chars {
    background-color: #ecf0f1; /* Slightly different bg for read-only */
    cursor: not-allowed;
}

.char-count-feedback {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: 4px;
    text-align: right;
}


/* Buttons */
.btn {
    display: inline-flex; /* For aligning icon and text */
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #27ae60; /* Green */
    color: white;
    width: 100%; /* Make generate button full width */
    margin-top: 10px;
}
.btn-primary:hover {
    background-color: #229954; /* Darker green */
}

.btn-secondary {
    background-color: #3498db; /* Blue */
    color: white;
    margin-left: 10px;
}
.btn-secondary:hover {
    background-color: #2980b9; /* Darker blue */
}
.btn:active {
    transform: translateY(1px);
}

.btn svg {
    margin-right: 8px;
}


/* Output Panel */
.output-panel {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.output-panel h2 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.password-display-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

#generated-password {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px 0 0 6px; /* Rounded left corners */
    font-size: 1.1em;
    background-color: #fdfdfe;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    overflow-x: auto; /* Handle very long passwords */
}
#copy-btn {
    border-radius: 0 6px 6px 0; /* Rounded right corners */
    margin-left: -1px; /* Overlap border */
}


.copy-feedback {
    font-size: 0.9em;
    color: #27ae60;
    min-height: 1.2em; /* Prevent layout shift */
    text-align: right;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Smartphone Adjustments */
@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    header h1 {
        font-size: 1.6em;
    }
    .btn {
        font-size: 0.95em;
        padding: 10px 15px;
    }
    #generated-password {
        font-size: 1em;
    }
}