* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0612, #1a0f2e, #0d0a1a);
}

#galaxyCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #0d0817 0%, #020305 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 40px 20px 10px 20px;
    margin-bottom: 10px;
}

h1.glow {
    font-size: 3.5rem;
    text-shadow: 
        0 0 10px rgba(138, 43, 226, 0.8),
        0 0 20px rgba(138, 43, 226, 0.6),
        0 0 30px rgba(138, 43, 226, 0.4),
        0 0 40px rgba(75, 0, 130, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { 
        text-shadow: 
            0 0 10px rgba(138, 43, 226, 0.8), 
            0 0 20px rgba(138, 43, 226, 0.6),
            0 0 30px rgba(138, 43, 226, 0.4);
    }
    to { 
        text-shadow: 
            0 0 20px rgba(138, 43, 226, 1), 
            0 0 30px rgba(138, 43, 226, 0.8), 
            0 0 40px rgba(75, 0, 130, 0.6),
            0 0 70px rgba(138, 43, 226, 0.7),
            0 0 100px rgba(138, 43, 226, 0.5);
    }
}

.subtitle {
    font-size: 1.3rem;
    color: #b8b8ff;
    margin-top: 10px;
}

.admin-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    background: rgba(138, 43, 226, 0.3);
    border: 2px solid rgba(138, 43, 226, 0.5);
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background: rgba(138, 43, 226, 0.5);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.product-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(138, 43, 226, 0.3);
    border-color: rgba(138, 43, 226, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-image.no-image span {
    font-size: 4rem;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #e0d0ff;
}

.description {
    color: #a8a8d8;
    margin-bottom: 15px;
    line-height: 1.6;
    min-height: 60px;
}

.price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #9d4edd;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 15px;
}

.buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.6);
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.no-products h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #b8b8d8;
}

.no-products p {
    color: #888899;
    font-size: 1.2rem;
}

/* Admin Panel */
.admin-nav {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-secondary {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.admin-panel {
    display: grid;
    gap: 40px;
}

.add-product-form, .products-list {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
}

.add-product-form h2, .products-list h2 {
    color: #e0d0ff;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #b8b8ff;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.6);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: rgba(138, 43, 226, 0.2);
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table th {
    color: #e0d0ff;
    font-weight: 600;
}

table td {
    color: #b8b8ff;
}

.thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.btn-delete {
    padding: 8px 16px;
    background: rgba(220, 53, 69, 0.6);
    border: 1px solid rgba(220, 53, 69, 0.8);
    border-radius: 15px;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: rgba(220, 53, 69, 0.8);
    transform: scale(1.05);
}

/* Login Page */
.login-container {
    max-width: 450px;
    margin: 100px auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
}

.login-form {
    margin-top: 30px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #b8b8ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #e0d0ff;
}

.login-hint {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(40, 167, 69, 0.3);
    border: 1px solid rgba(40, 167, 69, 0.6);
}

.alert-error {
    background: rgba(220, 53, 69, 0.3);
    border: 1px solid rgba(220, 53, 69, 0.6);
}

.no-products-text {
    color: #b8b8ff;
    text-align: center;
    padding: 40px;
}

/* Categories Filter */
.categories-filter {
    display: flex;
    gap: 15px;
    padding: 10px 20px 20px 20px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #b8b8ff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn:hover {
    background: rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.4);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(138, 43, 226, 0.6);
    color: white;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(138, 43, 226, 0.8);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(5px);
}

.category-tag {
    background: rgba(138, 43, 226, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #e0d0ff;
}

.no-category {
    color: #666;
    font-style: italic;
}

/* Form elements */
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.form-group select option {
    background: #1a0f2e;
    color: #fff;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header h1.glow {
        font-size: 2.5rem;
        letter-spacing: 8px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    .thumb {
        width: 40px;
        height: 40px;
    }
}
