/* ===== MAIN AUCTION SYSTEM THEME ===== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.nav-bar {
    background-color: #343a40;
    padding: 15px 30px;
    color: white;
    text-align: center;
}

.nav-bar h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.nav-bar p {
    opacity: 0.9;
    font-size: 1rem;
}

.main-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Enhanced Auction ID Selector - Updated for consistency */
.form-container {
    margin: 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.form-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.form-group {
    margin: 15px 0;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Enhanced Auction ID Input */
.auction-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.auction-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 8px 12px;
    gap: 8px;
}

.auction-input-icon {
    color: #007bff;
    font-size: 1rem;
}

#auction-id {
    border: none;
    outline: none;
    font-size: 1rem;
    color: #333;
    background: transparent;
    flex: 1;
    text-align: center;
    min-width: 80px;
    padding: 2px 8px;
}

#auction-id::-webkit-outer-spin-button,
#auction-id::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#auction-id[type=number] {
    -moz-appearance: textfield;
}

.auction-controls {
    display: flex;
    background: #f8f9fa;
    border-left: 1px solid #ddd;
}

.auction-btn {
    background: #007bff;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.auction-btn:hover {
    background: #0056b3;
}

.auction-btn:first-child {
    border-right: 1px solid rgba(255,255,255,0.3);
}

/* Button Styles - Consistent with main theme */
.btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

.logout-btn {
    background-color: #dc3545;
}

.logout-btn:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Status Indicator */
.status {
    background-color: #e7f3ff;
    padding: 15px;
    margin: 0;
    border-radius: 5px;
    border-left: 4px solid #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-connected {
    background-color: #d4edda;
    border-left-color: #28a745;
}

.status-connected .status-dot {
    background: #28a745;
}

.status-disconnected {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

.status-disconnected .status-dot {
    background: #dc3545;
}

.status-error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

.status-error .status-dot {
    background: #dc3545;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70% { box-shadow: 0 0 0 10px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* Auction Info */
.auction-info {
    background-color: #f8f9fa;
    padding: 20px;
    margin: 0;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.auction-info h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-auction-id {
    margin-bottom: 20px;
}

.bid-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.bid-stat {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.bid-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: bold;
}

.bid-stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    transition: all 0.3s ease;
}

/* Bid History */
.bid-history {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #007bff;
    flex: 1;
}

.bid-history h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#bid-history {
    max-height: 400px;
    overflow-y: auto;
}

.bid-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.bid-item.new-bid {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107;
    animation: highlightBid 2s ease-out;
}

@keyframes highlightBid {
    0% {
        background-color: #d1ecf1;
        transform: scale(1.02);
    }
    100% {
        background-color: #fff3cd;
        transform: scale(1);
    }
}

.bid-amount {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}

.bid-user {
    color: #6c757d;
    font-weight: 500;
}

.bid-time {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Notifications Container */
.notifications-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.notifications-header {
    background-color: #f8f9fa;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ddd;
}

.notifications-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background-color: #007bff;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* Enhanced System Events with more height */
#notifications {
    background-color: #f8f9fa;
    padding: 20px;
    height: 60vh;
    min-height: 400px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.notification {
    background: white;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
    border: 1px solid #ddd;
}

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

.notification-success {
    border-left-color: #28a745;
    background-color: #d4edda;
}

.notification-error {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.notification-info {
    border-left-color: #007bff;
    background-color: #e7f3ff;
}

.notification-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
}

.notification-bid {
    border-left-color: #6f42c1;
    background-color: #f3e8ff;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.notification-icon {
    font-size: 1.1rem;
}

.notification-time {
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: auto;
}

.notification-message {
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
    color: #333;
}

.notification-details {
    background-color: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 0.85rem;
}

.notification-details strong {
    color: #333;
}

/* Social Media Section - Updated to match theme */
.social-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #007bff;
    border: 1px solid #ddd;
}

.social-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.social-header h3 {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.social-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

.social-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.social-badge {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.social-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.social-badge img {
    width: 100%;
    height: auto;
    display: block;
}

/* Developer Info */
.developer-info {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    text-align: center;
    border: 1px solid #ddd;
}

.developer-info .dev-name {
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.developer-info .dev-role {
    color: #007bff;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.developer-info .dev-date {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Toast Notifications for Bid Updates */
.bid-notification {
    position: fixed;
    top: 20px;
    right: -400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    min-width: 320px;
    max-width: 400px;
}

.bid-notification.show {
    right: 20px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bid-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.bid-details {
    flex: 1;
}

.bid-notification .bid-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
}

.bid-notification .bid-user {
    opacity: 0.9;
    margin-bottom: 3px;
    color: white;
    font-size: 0.95rem;
}

.bid-notification .auction-title {
    opacity: 0.8;
    font-size: 0.85rem;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Scrollbar styling */
#notifications::-webkit-scrollbar,
.bid-history::-webkit-scrollbar {
    width: 8px;
}

#notifications::-webkit-scrollbar-track,
.bid-history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#notifications::-webkit-scrollbar-thumb,
.bid-history::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

#notifications::-webkit-scrollbar-thumb:hover,
.bid-history::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

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

    .bid-display {
        grid-template-columns: 1fr;
    }

    .bid-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nav-bar h1 {
        font-size: 1.5rem;
    }

    .bid-notification {
        right: -350px;
        min-width: 300px;
    }

    .social-badges {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }

    .social-section {
        padding: 16px;
    }

    #notifications {
        height: 50vh;
        min-height: 300px;
    }
}