* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 94%;
    max-width: 1200px;
    margin: auto;
}

.navbar {
    background: #111827;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 22px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-links a {
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-links a:hover {
    background: #374151;
}

h1,
h2,
h3 {
    margin-top: 0;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: #2563eb;
    color: white;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: #16a34a;
}

.btn-secondary {
    background: #6b7280;
}


/* Albums */

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.album-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

.album-cover {
    width: 100%;
    height: 180px;
    background: #ddd;
    overflow: hidden;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-info {
    padding: 15px;
}

.album-info h3 {
    margin-bottom: 8px;
}

.album-count {
    color: #777;
    font-size: 14px;
}


/* Photos */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.photo-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.photo-thumb {
    display: block;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #ddd;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.photo-thumb:hover img {
    transform: scale(1.05);
}

.photo-caption {
    padding: 10px;
    font-size: 14px;
}

.photo-stats {
    padding: 0 10px 10px;
    color: #777;
    font-size: 13px;
}


/* Full photo */

.photo-view {
    text-align: center;
}

.full-photo {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.photo-actions {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.caption-large {
    font-size: 20px;
    margin: 15px 0;
}


/* Forms */

.form-box {
    max-width: 600px;
    margin: 30px auto;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,.08);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 7px;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}


/* Admin */

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.admin-table img {
    width: 80px;
    height: 60px;
    object-fit: cover;
}


/* Message */

.message {
    padding: 12px;
    border-radius: 6px;
    background: #dcfce7;
    color: #166534;
    margin-bottom: 20px;
}

.error {
    background: #fee2e2;
    color: #991b1b;
}


/* Mobile */

@media (max-width: 600px) {

    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .photo-thumb {
        height: 120px;
    }

    .album-grid {
        grid-template-columns: 1fr;
    }

}
