/* /css/style.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: Tahoma, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}
a {
    color: #1a73e8;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}
header h1 {
    font-size: 1.6rem;
    font-weight: normal;
}
header .btn-add {
    background: #1a73e8;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    transition: background 0.2s;
}
header .btn-add:hover {
    background: #1557b0;
    text-decoration: none;
}

/* Search */
.search-block {
    background: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}
.search-block input[type="text"] {
    width: 100%;
    padding: 12px 18px;
    font-size: 1rem;
    border: 1px solid #d0d7de;
    border-radius: 30px;
    outline: none;
    transition: border 0.2s;
}
.search-block input[type="text"]:focus {
    border-color: #1a73e8;
}
.search-results {
    position: relative;
    margin-top: 8px;
}
.search-results ul {
    list-style: none;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 5px 0;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}
.search-results ul li {
    padding: 8px 18px;
    cursor: pointer;
}
.search-results ul li:hover {
    background: #f0f4ff;
}
.search-results ul li a {
    display: block;
    color: #333;
}
.search-results .no-result {
    padding: 10px 18px;
    color: #777;
}
.search-results .no-result .add-link {
    color: #1a73e8;
    font-weight: bold;
}

/* Cards grid */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.country-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.1s;
}
.country-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.country-card .name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 4px;
}
.country-card .code {
    color: #777;
    font-size: 0.9rem;
}
.country-card .stats {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}
.country-card .stats span {
    display: inline-block;
    margin-right: 15px;
}

/* Blocks (new items) */
.new-block {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.new-block h3 {
    font-weight: normal;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.new-block ul {
    list-style: none;
    padding: 0;
}
.new-block ul li {
    padding: 4px 0;
}
.new-block .meta {
    color: #777;
    font-size: 0.85rem;
}

/* Region list & City list */
.region-list, .city-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}
.region-list .item, .city-list .item {
    background: #fff;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: background 0.2s;
}
.region-list .item:hover, .city-list .item:hover {
    background: #f8faff;
}
.region-list .item a, .city-list .item a {
    display: block;
    color: #333;
}
.region-list .item .type, .city-list .item .type {
    font-size: 0.8rem;
    color: #888;
}

/* Detail page */
.detail-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.detail-card h2 {
    font-weight: normal;
    margin-bottom: 10px;
}
.detail-card .label {
    font-weight: bold;
    color: #555;
}
.detail-card .row {
    padding: 6px 0;
}

/* Add form */
.form-add {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.form-add label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-add input, .form-add select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 18px;
}
.form-add input:focus, .form-add select:focus {
    border-color: #1a73e8;
    outline: none;
}
.form-add .btn-submit {
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.form-add .btn-submit:hover {
    background: #1557b0;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    header h1 {
        font-size: 1.4rem;
    }
    header .btn-add {
        text-align: center;
    }
    .country-grid {
        grid-template-columns: 1fr 1fr;
    }
    .region-list, .city-list {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 480px) {
    .country-grid {
        grid-template-columns: 1fr;
    }
    .region-list, .city-list {
        grid-template-columns: 1fr;
    }
    .detail-card {
        padding: 15px;
    }
    .form-add {
        padding: 20px;
    }
}