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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --success: #10b981;
    --error: #ef4444;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --bg-lighter: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #475569;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 6px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.username {
    color: var(--text-muted);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    background: var(--bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-light);
    padding: 0.5rem;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
    resize: vertical;
    font-family: inherit;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-lighter);
    border-color: var(--primary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--bg-light);
    transform: scale(1.1);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

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

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--error);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success);
    color: #6ee7b7;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 2rem;
}

/* Share Section */
.share-section {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px var(--shadow);
}

.share-section p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.share-link-container {
    display: flex;
    gap: 1rem;
}

.share-link-container input {
    flex: 1;
    padding: 0.875rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.item-card {
    background: var(--bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow);
    transition: all 0.3s ease;
    animation: scaleIn 0.3s ease-out;
    position: relative;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.item-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-light);
}

.item-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    opacity: 0.3;
}

.item-content {
    padding: 1.5rem;
}

.item-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.item-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.item-price {
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.item-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.item-link:hover {
    color: var(--secondary);
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.item-card.view-mode .item-actions {
    display: none;
}

/* Empty State */
.empty-state,
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg);
    border-radius: 15px;
    box-shadow: 0 4px 6px var(--shadow);
}

.empty-state p,
.error-state p {
    color: var(--text-muted);
    margin-top: 1rem;
}

.error-state h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px var(--shadow);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions .btn {
    flex: 1;
}

/* View Header */
.view-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg);
    border-radius: 15px;
    box-shadow: 0 4px 6px var(--shadow);
}

.view-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.view-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer p {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

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

    .share-link-container {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
