/* Basic Modern Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

main {
    max-width: 1200px;
    /* Wider main area */
    margin: 20px auto;
    padding: 20px;
    background: transparent;
}

h1,
h2,
h3,
h4 {
    color: #2c3e50;
}

/* Form Styles */
form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #3498db;
    outline: none;
}

/* Combo/New Item Layout */
.combo-new-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.combo-new-group select {
    flex: 1;
}

.new-item-input {
    flex: 1;
    display: none;
    /* Hidden by default */
}

.toggle-btn {
    padding: 10px;
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 12px;
}

.toggle-btn:hover {
    background: #bdc3c7;
}


button[type="submit"] {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: background 0.3s, transform 0.1s;
    margin-top: 20px;
}

button:hover {
    background-color: #2980b9;
}

button:active {
    transform: translateY(1px);
}

/* Layout Utilities */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    margin-bottom: 20px;
}

.col {
    flex: 1;
    padding: 0 15px;
    min-width: 250px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* Messages */
.success-message {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* Stats Dashboard */
.stats {
    display: flex;
    justify-content: space-around;
    padding: 30px;
    background: white;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.stats p {
    font-size: 1.2em;
    color: #2c3e50;
    text-align: center;
}

/* Series Grid in List */
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.series-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.series-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.series-title {
    font-size: 1.25em;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    margin-bottom: 5px;
}

.series-meta {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: auto;
    /* Push to bottom if flex */
    padding-top: 10px;
}