:root {
    --background: #1a1a1a;
    --surface: #2c2c2c;
    --surface-bright: #3c3c3c;
    --primary: #00ff99;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    margin: 0;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--surface);
    padding: 2rem;
    height: 100vh;
    position: sticky;
    top: 0;
    border-right: 1px solid var(--surface-bright);
    box-sizing: border-box;
    border-radius: 0 12px 0 0;
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
    height: 100vh;
    box-sizing: border-box;
}

.main-content::before {
    content: "Wishlist";
    display: block;
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--surface-bright);
}

.filter-form, .quick-filters {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 2rem;
}

.filter-form h3, .quick-filters h3 {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.quick-filters {
    margin-top: 2rem;
}

.quick-filters a {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.quick-filters a:hover {
    color: var(--primary);
}

.quick-filters .admin-link {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-bright);
    font-weight: bold;
}

/* New List View Styles */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-list-item {
    display: flex;
    align-items: center;
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--surface-bright);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.product-list-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.product-list-image {
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.product-list-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.product-list-details {
    flex-grow: 1;
}

.product-list-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.product-list-header h2 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-primary);
}

.product-list-header h2 a {
    color: inherit;
    text-decoration: none;
}

.product-list-header h2 a:hover {
    color: var(--primary);
}

.product-list-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.product-list-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 1.5rem;
    text-align: right;
    width: 120px;
}

.product-list-stats .price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.external-link-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--surface-bright);
    color: var(--text-primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.external-link-btn:hover {
    background: var(--primary);
    color: var(--background);
}

/* Admin Header */
.admin-container {
    padding: 2rem;
    background: var(--surface);
    border-radius: 12px;
}

.admin-header {
    background: var(--primary);
    color: var(--background);
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.admin-header span {
    font-weight: bold;
    font-size: 1.1rem;
}

.admin-nav a {
    color: var(--background);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.admin-nav a:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--surface-bright);
    }

    .main-content {
        height: auto;
    }

    .product-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-list-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .product-list-stats {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.login-container h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.login-container .error {
    color: var(--danger);
    background: rgba(255, 82, 82, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Category Management Styles */
.category-form, .category-list {
    margin-bottom: 2rem;
}

.category-form h2, .category-list h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--surface-bright);
    padding-bottom: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--surface-bright);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.category-item .edit-form {
    display: flex;
    gap: 1rem;
    flex-grow: 1;
}

.category-item input[type="text"] {
    flex-grow: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    background-color: rgba(0, 255, 153, 0.1);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin: 0 0.2rem;
    border: 1px solid var(--primary);
}

.product-detail {
    display: flex;
    gap: 2rem;
    background: var(--surface);
    padding: 2rem;
    border-radius: 24px;
}

.product-detail img {
    max-width: 400px;
    height: auto;
    border-radius: 16px;
}

.button, input[type="submit"], button {
    display: inline-block;
    background-color: var(--primary);
    color: var(--background);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 12px;
    margin-top: 1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover, input[type="submit"]:hover, button:hover {
    background-color: #00e68a;
}

a {
    color: var(--primary);
    text-decoration: none;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea {
    background: var(--surface);
    border: 1px solid var(--text-secondary);
    border-radius: 12px;
    padding: 0.8rem;
    color: var(--text-primary);
}

label {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: block;
}

/* Styles for filter form are now part of the main sidebar styles */

.filter-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

/* Grid styles removed as they are replaced by list view */

.delete-form {
    margin-top: 2rem;
    background: #3c3c3c;
    padding: 1rem;
    border-radius: 12px;
}

.delete-form form {
    flex-direction: row;
    align-items: center;
}

.delete-button {
    background-color: #ff4d4d;
}

.delete-button:hover {
    background-color: #ff1a1a;
}