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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Header */
header {
    background: #1a1a1a;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header h1 {
    font-size: 32px;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

/* Navigation */
nav {
    background: #333;
    padding: 12px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    padding: 8px 15px;
}

nav a:hover {
    color: #ffd700;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

/* Messages */
.messages {
    margin: 20px 0;
}

.message {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Cards */
.card {
    background: white;
    padding: 30px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h2 {
    color: #1a1a1a;
    margin-bottom: 20px;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 10px;
    font-size: 24px;
}

.card h3 {
    color: #1a1a1a;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 18px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

input,
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* Buttons */
button,
.btn {
    background: #ffd700;
    color: black;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

button:hover,
.btn:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-primary {
    background: #ffd700;
    color: black;
}

.btn-primary:hover {
    background: #ffed4e;
}

.btn-secondary {
    background: #333;
    color: white;
}

.btn-secondary:hover {
    background: #555;
}

/* Hero Section */
.hero {
    background: white;
    padding: 60px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 36px;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 20px;
    margin-top: 0;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* User Status */
.user-status {
    background: #d4edda;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    color: #155724;
}

.user-status a {
    color: #155724;
    text-decoration: underline;
    font-weight: bold;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-section h3 {
    margin-bottom: 15px;
    color: #1a1a1a;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.category-btn:hover {
    border-color: #ffd700;
    color: #ffd700;
}

.category-btn.active {
    background: #ffd700;
    color: black;
    border-color: #ffd700;
}

/* Instruments Grid */
.instruments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.instrument-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instrument-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.instrument-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.instrument-info {
    padding: 20px;
}

.instrument-name {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.instrument-category {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.instrument-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.instrument-price {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 15px;
}

.instrument-stock {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: #ffd700;
    color: black;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #ffed4e;
}

.add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Login/Signup Prompt */
.login-prompt {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    margin: 30px 0;
}

.login-prompt a {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cart-table th {
    background: #f0f0f0;
    font-weight: bold;
}

.cart-table tr:hover {
    background: #f9f9f9;
}

.total {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    margin-top: 20px;
    text-align: right;
}

.empty-cart {
    text-align: center;
    padding: 30px;
    color: #666;
}

/* Profile Info */
.profile-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.info-label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
}

/* Login/Signup Container */
.login-container,
.signup-container {
    max-width: 500px;
    margin: 50px auto;
}

.login-card,
.signup-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-card h1,
.signup-card h1 {
    color: #1a1a1a;
    margin-bottom: 10px;
    text-align: center;
}

.login-card p,
.signup-card p {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.help-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.signup-link,
.login-link {
    text-align: center;
    margin-top: 20px;
}

.signup-link a,
.login-link a {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}

.signup-link a:hover,
.login-link a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .hero {
        padding: 30px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .profile-info {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }

    nav a {
        display: block;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 24px;
    }

    .instruments-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 20px;
    }

    .hero h2 {
        font-size: 20px;
    }

    .hero p {
        font-size: 14px;
    }
}
