:root {
    --primary-blue: #2c3e50;
    --secondary-blue: #3498db;
    --primary-orange: #e67e22;
    --secondary-orange: #f39c12;
    --light-gray: #f5f7fa;
    --dark-gray: #34495e;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

header {
    background: var(--primary-blue);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: var(--secondary-blue);
    background: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.points {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--white);
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.8rem;
    }

    .user-menu {
        flex-direction: column;
        border-left: none;
        padding-left: 0;
        width: 100%;
        margin-top: 0.5rem;
    }

    .points {
        width: 100%;
        text-align: center;
    }
}

nav h1 {
    color: var(--white);
    font-size: 1.8rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: var(--secondary-blue);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-orange);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-orange);
}

.btn-secondary {
    background: var(--secondary-blue);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--primary-blue);
}

.card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-blue);
    outline: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    display: block;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-info {
    padding: 15px;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.product-points {
    color: var(--primary-orange);
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background: var(--primary-blue);
    color: var(--white);
}

.table tr:hover {
    background: var(--light-gray);
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        text-align: center;
    }
    
    nav h1 {
        margin-bottom: 1rem;
    }
    
    nav a {
        display: block;
        margin: 0.5rem 0;
    }
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-actions h2 {
    margin: 0;
}

.product-images {
    margin-bottom: 20px;
}

.main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.additional-images {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.user-rating {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #fbbf24;
    font-size: 1.1em;
}

.stars i.far {
    color: #e5e7eb;
}

.rating-count {
    color: #6b7280;
    font-size: 0.9em;
    margin-left: 4px;
}

.rating-summary {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.ratings-page {
    max-width: 800px;
    margin: 0 auto;
}

.user-profile-header {
    background: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.rating-overview {
    margin-top: 20px;
}

.average-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.rating-number {
    font-size: 2em;
    font-weight: 600;
    color: #4f46e5;
}

.rating-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.rating-info {
    text-align: right;
}

.rater {
    color: #4f46e5;
    font-weight: 500;
    display: block;
}

.date {
    color: #6b7280;
    font-size: 0.9em;
}

.rating-comment {
    color: #374151;
    line-height: 1.6;
    margin: 15px 0;
}

.exchange-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.9em;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.stars .active {
    color: #fbbf24;
}

.wishlist-container {
    margin-top: 100px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
}

.wishlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.wishlist-header h1 {
    color: var(--primary-blue);
    font-size: 2em;
}

.add-wish-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-orange);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.add-wish-btn:hover {
    background: var(--secondary-orange);
    transform: translateY(-2px);
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.wish-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.wish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wish-title {
    color: var(--primary-blue);
    font-size: 1.2em;
    margin-bottom: 10px;
}

.wish-category {
    color: var(--secondary-blue);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.wish-description {
    color: var(--dark-gray);
    margin-bottom: 15px;
    line-height: 1.6;
}

.wish-points {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--primary-orange);
    font-weight: 500;
}

.wish-condition {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light-gray);
    border-radius: 20px;
    font-size: 0.9em;
    color: var(--dark-gray);
}

.wish-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.wish-actions a {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.edit-wish {
    background: var(--secondary-blue);
    color: white;
}

.delete-wish {
    background: #e74c3c;
    color: white;
}

.wish-actions a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.no-wishes {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    color: var(--dark-gray);
}

@media (max-width: 768px) {
    .wishlist-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .wishlist-grid {
        grid-template-columns: 1fr;
    }
}