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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Welcome Page */
.welcome-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.welcome-card {
    background: white;
    border-radius: 24px;
    padding: 60px 40px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

.icon-wrapper {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.icon-large {
    width: 60px;
    height: 60px;
    color: white;
}

.welcome-card h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #1a202c;
}

.subtitle {
    font-size: 1.2rem;
    color: #718096;
    margin-bottom: 40px;
}

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

.feature-card {
    padding: 30px;
    background: #f7fafc;
    border-radius: 16px;
}

.feature-card .icon {
    width: 48px;
    height: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.feature-card p {
    color: #718096;
    font-size: 0.9rem;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

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

.btn-light {
    background: white;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.btn-disabled {
    background: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.icon-small {
    width: 20px;
    height: 20px;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.icon-wrapper-small {
    width: 64px;
    height: 64px;
    background: #edf2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icon-wrapper-small .icon {
    width: 32px;
    height: 32px;
    color: #667eea;
}

.auth-card h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 10px;
    color: #1a202c;
}

.auth-subtitle {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
}

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

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #68d391;
}

.demo-credentials {
    background: #edf2f7;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.demo-credentials p {
    font-size: 0.9rem;
    margin: 5px 0;
    color: #4a5568;
}

.auth-link {
    text-align: center;
    color: #718096;
}

.auth-link a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #718096;
    text-decoration: none;
}

.back-link:hover {
    color: #4a5568;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section h1 {
    font-size: 1.8rem;
    margin: 0;
}

.logo-section p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Statistics */
.stats-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.stats-container h3 {
    margin-bottom: 20px;
    color: #2d3748;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.stat-green { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); color: white; }
.stat-purple { background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%); color: white; }
.stat-orange { background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%); color: white; }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Products Grid */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2d3748;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

.product-content {
    padding: 20px;
}

.product-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.product-description {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-details {
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.detail-value {
    font-weight: 600;
}

.current-price {
    color: #48bb78;
    font-size: 1.2rem;
}

.my-bid {
    color: #667eea;
}

.leading-badge {
    background: #c6f6d5;
    color: #22543d;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 15px;
    border: 1px solid #9ae6b4;
}

.timer-box {
    background: #edf2f7;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.countdown {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
}

.empty-state {
    background: white;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.empty-state .icon-large {
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.2rem;
    color: #718096;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
}

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2d3748;
}

.modal-current-price {
    color: #718096;
    margin-bottom: 20px;
}

.modal-current-price span {
    font-weight: 700;
    color: #48bb78;
    font-size: 1.2rem;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

/* Admin Specific */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.admin-products {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-product-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 20px;
}

.product-info {
    flex: 1;
}

.product-info h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #2d3748;
}

.product-desc {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.product-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.current-highlight {
    color: #48bb78;
    font-weight: 600;
}

.product-actions {
    text-align: right;
}

.status-info {
    margin-bottom: 15px;
}

.time-remaining {
    display: block;
    color: #718096;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.time-expired {
    display: block;
    color: #f56565;
    margin-bottom: 10px;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-ended {
    background: #cbd5e0;
    color: #4a5568;
}

.winner-info {
    background: #c6f6d5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
    border: 1px solid #9ae6b4;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-card {
        padding: 40px 20px;
    }
    
    .welcome-card h1 {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-product-card {
        flex-direction: column;
    }
    
    .product-actions {
        width: 100%;
        text-align: left;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}