* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}

header h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: #34495e;
}

nav span {
    color: #ecf0f1;
    margin-left: auto;
}

/* Main content */
main {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 400px;
}

/* Albums grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.album-thumb {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.album-thumb:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.album-thumb img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.no-cover {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.album-thumb-info {
    padding: 1rem;
}

.album-thumb-info h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.album-thumb-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Photo gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-item a {
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item-info strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.gallery-item-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Album header */
.album-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.back-link:hover {
    text-decoration: underline;
}

.album-meta {
    color: #7f8c8d;
    margin-top: 1rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e74c3c;
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Login form */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-weight: normal;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Messages */
.error-message, .message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    background: #e8f5e9;
    color: #2e7d32;
}

.error-message {
    background: #ffebee;
    color: #c62828;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

.empty-message {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background: #ecf0f1;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

/* Admin styles */
.admin-dashboard {
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-weight: normal;
}

.stat-number {
    font-size: 3rem;
    color: #3498db;
    font-weight: bold;
    margin-bottom: 1rem;
}

.admin-section {
    margin-bottom: 3rem;
}

.admin-section h2, .admin-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.admin-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.album-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.album-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.album-info {
    margin-bottom: 1rem;
}

.album-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.permissions-form {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 4px;
}

.checkbox-list {
    margin: 1rem 0;
}

.checkbox-item {
    display: block;
    padding: 0.5rem;
    cursor: pointer;
}

.checkbox-item:hover {
    background: #f8f9fa;
}

.checkbox-group {
    margin: 1rem 0;
}

/* Photo grid for admin */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.photo-item {
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-info {
    padding: 1rem;
}

.photo-info strong {
    display: block;
    margin-bottom: 0.5rem;
}

.photo-info p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.recent-activity {
    margin-top: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .albums-grid,
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav span {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .album-actions {
        flex-direction: column;
    }
}
