/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
        url('background2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Market Page Styles */
.market-section {
    margin-top: 80px;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

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

.market-header {
    text-align: center;
    margin-bottom: 40px;
}

.market-header h1 {
    font-size: 48px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.market-search {
    margin: 20px 0;
}

.search-box {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

.search-box:focus {
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.market-stats {
    font-size: 18px;
    color: #ffffff;
    opacity: 0.8;
}

.market-content {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.loading {
    text-align: center;
    font-size: 18px;
    color: #00ffff;
    padding: 40px;
}

.error-message {
    text-align: center;
    font-size: 18px;
    color: #ff4444;
    padding: 40px;
}

.no-results {
    text-align: center;
    font-size: 18px;
    color: #ffaa00;
    padding: 40px;
    font-style: italic;
}

/* Category Styles */
.category-section {
    margin-bottom: 20px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 128, 255, 0.1) 100%);
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.category-header:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 128, 255, 0.2) 100%);
    transform: translateX(5px);
}

.category-toggle {
    color: #00ffff;
    font-size: 14px;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.category-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    flex: 1;
}

.category-count {
    font-size: 14px;
    color: #cccccc;
    opacity: 0.8;
}

.category-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 0;
}

/* Group Styles */
.group-section {
    border-bottom: 1px solid rgba(0, 255, 255, 0.05);
}

.group-header {
    background: rgba(0, 255, 255, 0.05);
    padding: 12px 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.group-header:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateX(3px);
}

.group-toggle {
    color: #00aaaa;
    font-size: 12px;
    width: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.group-name {
    font-size: 16px;
    color: #dddddd;
    flex: 1;
}

.group-count {
    font-size: 12px;
    color: #aaaaaa;
    opacity: 0.8;
}

.group-content {
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
}

/* Item Styles */
.item-row {
    display: flex;
    align-items: center;
    padding: 12px 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.item-row:hover {
    background: rgba(0, 255, 255, 0.05);
    transform: translateX(2px);
}

.item-row:last-child {
    border-bottom: none;
}

.item-icon {
    width: 48px;
    height: 48px;
    margin-right: 15px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.item-name {
    flex: 1;
    font-size: 14px;
    color: #ffffff;
    margin-right: 20px;
}

.item-price {
    font-size: 14px;
    font-weight: bold;
    color: #00ff88;
    text-align: right;
    min-width: 100px;
}

/* Navigation Styles */
.navigation {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: #00ffff;
    letter-spacing: 2px;
}

.logo .subtitle {
    font-size: 12px;
    color: #ffffff;
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-menu a:hover {
    color: #00ffff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn, .logout-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover, .logout-btn:hover {
    background: #00ffff;
    color: #000000;
    border-color: #00ffff;
}

.logout-btn {
    border-color: #ff4444;
    color: #ff4444;
}

.logout-btn:hover {
    background: #ff4444;
    color: #ffffff;
    border-color: #ff4444;
}

.username-display {
    color: #00ffff;
    font-size: 12px;
    font-weight: bold;
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.language-selector {
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00ffff;
    border-color: #00ffff;
}

.mobile-nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    padding: 15px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-nav-link:hover {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    transform: translateX(10px);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Space Dust Layer 1 - Fast particles */
.hero-section::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: 
        radial-gradient(1px 1px at 23px 41px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 87px 23px, rgba(0, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 156px 78px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 34px 134px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 198px 45px, rgba(0, 255, 255, 0.5), transparent);
    background-repeat: repeat;
    background-size: 200px 180px;
    animation: spaceDustFast 12s linear infinite;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

/* Space Dust Layer 2 - Medium particles */
.hero-section::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: 
        radial-gradient(2px 2px at 67px 89px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 123px 34px, rgba(0, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 45px 167px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 189px 112px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 12px 67px, rgba(0, 255, 255, 0.5), transparent);
    background-repeat: repeat;
    background-size: 250px 200px;
    animation: spaceDustMedium 18s linear infinite;
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
}

@keyframes spaceDustFast {
    from { 
        transform: translate(120vw, 120vh) rotate(0deg); 
    }
    to { 
        transform: translate(-120vw, -120vh) rotate(180deg); 
    }
}

@keyframes spaceDustMedium {
    from { 
        transform: translate(110vw, 110vh) rotate(0deg); 
    }
    to { 
        transform: translate(-110vw, -110vh) rotate(270deg); 
    }
}

@keyframes spaceDustSlow {
    from { 
        transform: translate(100vw, 100vh) rotate(0deg); 
    }
    to { 
        transform: translate(-100vw, -100vh) rotate(360deg); 
    }
}

@keyframes spaceDustVerySlow {
    from { 
        transform: translate(90vw, 90vh) rotate(0deg); 
    }
    to { 
        transform: translate(-90vw, -90vh) rotate(90deg); 
    }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 100px 20px 20px;
    align-items: center;
}

.hero-left {
    z-index: 10;
}

.promotional-banner {
    background: rgba(0, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.promo-text {
    font-size: 12px;
    color: #00ffff;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.main-title {
    font-size: 48px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.subtitle-text {
    font-size: 24px;
    color: #00ffff;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.description {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 40px;
    opacity: 0.8;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.primary-btn {
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 128, 255, 0.1) 100%),
        linear-gradient(45deg, rgba(0, 0, 0, 0.8) 0%, rgba(20, 20, 40, 0.9) 100%);
    border: 2px solid rgba(0, 255, 255, 0.4);
    padding: 20px 30px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.primary-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.3), rgba(0, 128, 255, 0.3), rgba(0, 255, 255, 0.3));
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.primary-btn:hover::before {
    left: 100%;
}

.manufacturing-btn {
    border-color: rgba(0, 255, 255, 0.5);
    background: 
        linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 200, 255, 0.15) 100%),
        linear-gradient(45deg, rgba(10, 25, 35, 0.9) 0%, rgba(15, 30, 45, 0.9) 100%);
}

.manufacturing-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 255, 0.8);
    box-shadow: 
        0 15px 35px rgba(0, 255, 255, 0.3),
        0 0 40px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.manufacturing-btn:hover::after {
    opacity: 1;
}

.buyback-btn {
    border-color: rgba(255, 140, 0, 0.5);
    background: 
        linear-gradient(135deg, rgba(255, 140, 0, 0.15) 0%, rgba(255, 100, 0, 0.15) 100%),
        linear-gradient(45deg, rgba(35, 20, 10, 0.9) 0%, rgba(45, 25, 15, 0.9) 100%);
}

.buyback-btn::after {
    background: linear-gradient(45deg, rgba(255, 140, 0, 0.3), rgba(255, 100, 0, 0.3), rgba(255, 140, 0, 0.3));
}

.buyback-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 140, 0, 0.8);
    box-shadow: 
        0 15px 35px rgba(255, 140, 0, 0.3),
        0 0 40px rgba(255, 140, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.buyback-btn:hover::after {
    opacity: 1;
}

.market-btn {
    border-color: rgba(150, 0, 255, 0.5);
    background: 
        linear-gradient(135deg, rgba(150, 0, 255, 0.15) 0%, rgba(120, 0, 255, 0.15) 100%),
        linear-gradient(45deg, rgba(25, 10, 35, 0.9) 0%, rgba(35, 15, 45, 0.9) 100%);
}

.market-btn::after {
    background: linear-gradient(45deg, rgba(150, 0, 255, 0.3), rgba(120, 0, 255, 0.3), rgba(150, 0, 255, 0.3));
}

.market-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(150, 0, 255, 0.8);
    box-shadow: 
        0 15px 35px rgba(150, 0, 255, 0.3),
        0 0 40px rgba(150, 0, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.market-btn:hover::after {
    opacity: 1;
}

.btn-icon {
    font-size: 24px;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    position: relative;
    z-index: 1;
}

.btn-text {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.btn-subtitle {
    font-size: 10px;
    color: #ffffff;
    opacity: 0.7;
    margin-top: 2px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.secondary-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.secondary-btn {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.secondary-btn:hover {
    background: #00ffff;
    color: #000000;
}

.platform-icons {
    display: flex;
    gap: 10px;
}

.platform-icon {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 10px;
    color: #ffffff;
    font-weight: bold;
}

/* Hero Right - Space Scene */
.hero-right {
    position: relative;
    height: 500px;
}

.space-scene {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Additional Space Dust Layers using space-scene */
.space-scene::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: 
        radial-gradient(1px 1px at 145px 67px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 78px 145px, rgba(0, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 234px 23px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 56px 189px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 167px 156px, rgba(0, 255, 255, 0.4), transparent);
    background-repeat: repeat;
    background-size: 280px 240px;
    animation: spaceDustSlow 25s linear infinite;
    opacity: 0.4;
    pointer-events: none;
    z-index: 3;
}

.space-scene::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    background: 
        radial-gradient(2px 2px at 112px 198px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 267px 87px, rgba(0, 255, 255, 0.2), transparent),
        radial-gradient(3px 3px at 45px 234px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 189px 123px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 78px 45px, rgba(0, 255, 255, 0.3), transparent);
    background-repeat: repeat;
    background-size: 320px 280px;
    animation: spaceDustVerySlow 35s linear infinite;
    opacity: 0.3;
    pointer-events: none;
    z-index: 4;
}






/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .main-title {
        font-size: 36px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .primary-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .hero-right {
        height: 300px;
    }
}

/* Buyback Page Styles */
.buyback-section {
    margin-top: 80px;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

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

.buyback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(0, 20, 40, 0.8);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.buyback-header h1 {
    font-size: 32px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    letter-spacing: 2px;
}

.buyback-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.language-toggle {
    background: linear-gradient(135deg, #00ffff, #0080ff);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.language-toggle:hover {
    background: linear-gradient(135deg, #0080ff, #00ffff);
    transform: scale(1.05);
}

.compression-controls {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 60, 120, 0.3);
    border-radius: 5px;
}

.compression-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
}

.compression-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.buyback-categories {
    margin-bottom: 30px;
}

.category-section {
    margin-bottom: 20px;
    background: rgba(0, 20, 40, 0.6);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 40, 80, 0.8);
    cursor: pointer;
    transition: background 0.3s ease;
}

.category-header:hover {
    background: rgba(0, 60, 120, 0.8);
}

.category-header h2 {
    color: #00ffff;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    margin: 0;
}

.category-toggle {
    color: #00ffff;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.category-content {
    padding: 20px;
    transition: all 0.3s ease;
}

.category-content.collapsed {
    display: none;
}

.category-header.expanded .category-toggle {
    transform: rotate(180deg);
}

.subcategory-section {
    margin-bottom: 30px;
}

.subcategory-section h3 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 15px;
}

.item-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    min-height: 70px;
}

.item-row:hover {
    background: rgba(0, 40, 80, 0.4);
    border-color: rgba(0, 255, 255, 0.4);
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.2);
    object-fit: cover;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.item-name {
    color: #ffffff;
    font-weight: bold;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.item-price {
    color: #00ffff;
    font-size: 12px;
    margin: 0;
    padding: 0;
    line-height: 1;
    white-space: nowrap;
    text-align: right;
}

.item-input {
    width: 80px;
    height: 36px;
    padding: 8px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.item-total {
    color: #00ff00;
    font-weight: bold;
    min-width: 100px;
    text-align: right;
    font-size: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.group-header {
    background: rgba(0, 60, 120, 0.6);
    padding: 8px 15px;
    margin: 15px 0 10px 0;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-header h4 {
    color: #ffffff;
    font-size: 14px;
    margin: 0;
}

.group-toggle {
    color: #00ffff;
    transition: transform 0.3s ease;
}

.group-header.collapsed .group-toggle {
    transform: rotate(-90deg);
}

.group-items {
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 15px;
}

.group-items.collapsed {
    display: none;
}

.buyback-total {
    position: sticky;
    bottom: 20px;
    background: linear-gradient(135deg, rgba(0, 40, 80, 0.9), rgba(0, 60, 120, 0.9));
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.total-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#totalLabel {
    font-size: 18px;
    color: #ffffff;
    font-weight: bold;
}

.total-amount {
    font-size: 28px;
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.submit-btn {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #00cc00, #00ff00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 0, 0.3);
}

/* Responsive Design for Buyback */
@media (max-width: 768px) {
    .buyback-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .buyback-header h1 {
        font-size: 32px;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .item-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .item-details {
        flex: 1;
        min-width: 150px;
    }
    
    .total-display {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .total-info {
        align-items: center;
    }
    
    .submit-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* Authentication Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(15px);
    animation: modalFadeIn 0.3s ease;
}

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

.auth-modal-content {
    background: linear-gradient(135deg, rgba(0, 40, 80, 0.98) 0%, rgba(0, 60, 120, 0.98) 100%);
    border: 3px solid rgba(0, 255, 255, 0.6);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.auth-modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(0, 255, 255, 0.4) 0%, 
        rgba(0, 128, 255, 0.4) 25%, 
        rgba(0, 255, 255, 0.4) 50%, 
        rgba(0, 128, 255, 0.4) 75%, 
        rgba(0, 255, 255, 0.4) 100%);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.auth-header h2 {
    color: #00ffff;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 255, 255, 0.3),
        0 0 30px rgba(0, 255, 255, 0.2);
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.form-group input {
    padding: 15px 20px;
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.form-group input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.4),
        inset 0 2px 5px rgba(0, 0, 0, 0.3);
    background: rgba(0, 20, 40, 0.8);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-hint {
    color: #cccccc;
    font-size: 12px;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.auth-submit-btn {
    flex: 1;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    color: #000000;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.auth-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.auth-submit-btn:hover::before {
    left: 100%;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #0080ff, #00ffff);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
}

.auth-submit-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.auth-toggle-btn {
    background: transparent;
    color: #00ffff;
    border: 2px solid #00ffff;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.auth-toggle-btn:hover {
    background: rgba(0, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
    border-color: #00ccff;
}

.auth-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.2);
}

/* Rankings Section Styles */
.rankings-section {
    margin-top: 80px;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

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

.rankings-header {
    text-align: center;
    margin-bottom: 50px;
}

.rankings-header h1 {
    font-size: 48px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.rankings-subtitle {
    font-size: 18px;
    color: #cccccc;
    opacity: 0.8;
}

.rankings-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Podium Styles */
.rankings-podium {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 30px;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: radial-gradient(ellipse at center, rgba(0, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 20px;
    position: relative;
}

.rankings-podium::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 20px;
    border-radius: 20px;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    min-width: 180px;
    overflow: hidden;
}

.podium-place::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    border-radius: 20px 20px 0 0;
}

.podium-place:hover {
    transform: translateY(-8px) scale(1.05);
    filter: brightness(1.1);
}

.podium-place.first {
    background: 
        linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 193, 7, 0.3) 50%, rgba(255, 215, 0, 0.3) 100%),
        linear-gradient(45deg, rgba(255, 223, 0, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 3px solid rgba(255, 215, 0, 0.8);
    order: 2;
    transform: scale(1.15);
    box-shadow: 
        0 20px 50px rgba(255, 215, 0, 0.3),
        0 0 40px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #ffd700;
    z-index: 3;
}

.podium-place.first::after {
    content: '👑';
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 30px;
    animation: crown 2s ease-in-out infinite;
}

@keyframes crown {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.podium-place.second {
    background: 
        linear-gradient(135deg, rgba(192, 192, 192, 0.3) 0%, rgba(169, 169, 169, 0.3) 50%, rgba(192, 192, 192, 0.3) 100%),
        linear-gradient(45deg, rgba(220, 220, 220, 0.1) 0%, rgba(192, 192, 192, 0.1) 100%);
    border: 3px solid rgba(192, 192, 192, 0.8);
    order: 1;
    transform: scale(1.05);
    box-shadow: 
        0 15px 40px rgba(192, 192, 192, 0.3),
        0 0 30px rgba(192, 192, 192, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #c0c0c0;
    z-index: 2;
}

.podium-place.second::after {
    content: '🥈';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 25px;
}

.podium-place.third {
    background: 
        linear-gradient(135deg, rgba(205, 127, 50, 0.3) 0%, rgba(184, 115, 51, 0.3) 50%, rgba(205, 127, 50, 0.3) 100%),
        linear-gradient(45deg, rgba(218, 165, 32, 0.1) 0%, rgba(205, 127, 50, 0.1) 100%);
    border: 3px solid rgba(205, 127, 50, 0.8);
    order: 3;
    box-shadow: 
        0 12px 35px rgba(205, 127, 50, 0.3),
        0 0 25px rgba(205, 127, 50, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #cd7f32;
    z-index: 1;
}

.podium-place.third::after {
    content: '🥉';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 25px;
}

.podium-rank {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 
        0 0 20px currentColor,
        0 0 40px currentColor,
        2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1;
    animation: rankGlow 2s ease-in-out infinite alternate;
}

@keyframes rankGlow {
    0% {
        text-shadow: 
            0 0 20px currentColor,
            0 0 40px currentColor,
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    100% {
        text-shadow: 
            0 0 30px currentColor,
            0 0 60px currentColor,
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
}

.podium-place.first .podium-rank {
    color: #ffd700;
}

.podium-place.second .podium-rank {
    color: #c0c0c0;
}

.podium-place.third .podium-rank {
    color: #cd7f32;
}

.podium-user {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 12px;
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 0.5),
        1px 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.podium-amount {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 
        0 0 10px currentColor,
        1px 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
}

.podium-place.first .podium-amount {
    color: #ffd700;
}

.podium-place.second .podium-amount {
    color: #c0c0c0;
}

.podium-place.third .podium-amount {
    color: #cd7f32;
}

.podium-base {
    width: 100px;
    height: 40px;
    border-radius: 8px;
    position: relative;
    margin-top: 10px;
    overflow: hidden;
}

.podium-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: baseShine 3s ease-in-out infinite;
}

@keyframes baseShine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: -100%;
    }
}

.podium-base.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 50%, #ffd700 100%);
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.3),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #ffed4a;
}

.podium-base.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e5e5e5 50%, #c0c0c0 100%);
    box-shadow: 
        0 6px 20px rgba(192, 192, 192, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.3),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #e5e5e5;
}

.podium-base.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 50%, #cd7f32 100%);
    box-shadow: 
        0 6px 20px rgba(205, 127, 50, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.3),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #daa520;
}

/* Rankings Table Styles */
.rankings-table {
    background: rgba(0, 20, 40, 0.8);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.table-header {
    display: grid;
    grid-template-columns: 80px 1fr 200px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 128, 255, 0.2) 100%);
    padding: 20px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

.table-body {
    max-height: 600px;
    overflow-y: auto;
}

.ranking-row {
    display: grid;
    grid-template-columns: 80px 1fr 200px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
    align-items: center;
}

.ranking-row:hover {
    background: rgba(0, 40, 80, 0.6);
    transform: translateX(5px);
}

.ranking-row:last-child {
    border-bottom: none;
}

.rank-col {
    font-size: 18px;
    font-weight: bold;
    color: #00ffff;
    text-align: center;
}

.user-col {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
}

.amount-col {
    color: #00ff88;
    font-size: 16px;
    font-weight: bold;
    text-align: right;
}

.loading-rankings {
    text-align: center;
    padding: 40px;
    color: #00ffff;
    font-size: 18px;
}

/* Special styling for top 3 in table */
.ranking-row.rank-1 .rank-col {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.ranking-row.rank-2 .rank-col {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.ranking-row.rank-3 .rank-col {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

/* Responsive Design for Rankings */
@media (max-width: 768px) {
    .rankings-podium {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .podium-place {
        width: 100%;
        max-width: 300px;
        transform: none !important;
    }
    
    .podium-place.first {
        order: 1;
    }
    
    .table-header, .ranking-row {
        grid-template-columns: 60px 1fr 120px;
        padding: 12px 15px;
    }
    
    .rank-col {
        font-size: 14px;
    }
    
    .user-col {
        font-size: 14px;
    }
    
    .amount-col {
        font-size: 12px;
    }
}

/* Manufacturing Page Styles */
.manufacturing-section {
    margin-top: 80px;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

.manufacturing-container {
    max-width: 1000px;
    margin: 0 auto;
}

.manufacturing-header {
    text-align: center;
    margin-bottom: 40px;
}

.manufacturing-header h1 {
    font-size: 48px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 15px;
    letter-spacing: 3px;
}

.manufacturing-subtitle {
    font-size: 18px;
    color: #cccccc;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.search-section {
    margin-bottom: 30px;
}

.search-container {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    align-items: center;
}

.manufacturing-search-box {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ffff;
    border-radius: 8px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.manufacturing-search-box:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.manufacturing-search-box::placeholder {
    color: #888888;
}

.search-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #00ffff 0%, #0080ff 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.search-icon {
    font-size: 18px;
}

.results-section {
    margin-top: 30px;
}

.result-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
    animation: fadeInUp 0.5s ease;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.result-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 2px solid #00ffff;
    background: rgba(0, 0, 0, 0.5);
}

.result-info {
    flex: 1;
}

.result-name {
    font-size: 28px;
    color: #00ffff;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.result-cost {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cost-amount {
    font-size: 24px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.cost-label {
    font-size: 14px;
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ffaa00;
}

.cost-breakdown {
    margin-bottom: 25px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
}

.breakdown-item.total {
    font-size: 18px;
    font-weight: bold;
    color: #00ff88;
}

.breakdown-label {
    color: #cccccc;
}

.breakdown-value {
    color: #ffffff;
    font-weight: bold;
}

.breakdown-divider {
    height: 1px;
    background: rgba(0, 255, 255, 0.3);
    margin: 10px 0;
}

.materials-section h3,
.blueprint-details-section h3,
.manufacturing-details-section h3,
.manufacturing-tree-section h3,
.manufacturing-costs-section h3,
.base-materials-section h3 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.blueprint-details-section,
.manufacturing-details-section,
.manufacturing-tree-section,
.manufacturing-costs-section,
.base-materials-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.materials-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.material-breakdown-item {
    display: grid;
    grid-template-columns: 48px 2fr 1fr 1fr 1fr;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: border-color 0.2s ease;
}

.material-breakdown-item:hover {
    border-color: rgba(0, 255, 255, 0.3);
}

.material-breakdown-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #00ffff;
    background: rgba(0, 0, 0, 0.5);
}

.material-breakdown-name {
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
}

.material-breakdown-quantity {
    color: #cccccc;
    text-align: right;
    font-size: 14px;
}

.material-breakdown-unit-price {
    color: #00ff88;
    text-align: right;
    font-size: 14px;
}

.material-breakdown-total {
    color: #ffaa00;
    text-align: right;
    font-weight: bold;
    font-size: 14px;
}

.base-materials-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.base-material-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.base-material-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #00ffff;
    background: rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.base-material-info {
    flex: 1;
    min-width: 0;
}

.base-material-name {
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.base-material-details {
    color: #cccccc;
    font-size: 11px;
}

.cost-source-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.cost-source-buyback {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}

.cost-source-market {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border: 1px solid #ffaa00;
}

.cost-source-calculated {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    border: 1px solid #00ffff;
}

/* Manufacturing Tree Styles */
.manufacturing-tree {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    padding: 15px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    overflow-x: auto;
}

.tree-item {
    display: flex;
    align-items: center;
    margin: 4px 0;
    color: #ffffff;
    font-size: 14px;
}

.tree-indent {
    color: #666666;
    margin-right: 8px;
}

.tree-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    flex-shrink: 0;
}

.tree-content {
    flex: 1;
}

.tree-item-name {
    color: #00ffff;
    font-weight: bold;
}

.tree-item-details {
    color: #cccccc;
    margin-left: 8px;
}

.tree-item-cost {
    color: #ffaa00;
    font-weight: bold;
    margin-left: 8px;
}

.tree-level-0 { margin-left: 0; }
.tree-level-1 { margin-left: 20px; }
.tree-level-2 { margin-left: 40px; }
.tree-level-3 { margin-left: 60px; }
.tree-level-4 { margin-left: 80px; }
.tree-level-5 { margin-left: 100px; }

/* Manufacturing Costs Breakdown */
.manufacturing-costs-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cost-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.cost-item-name {
    color: #ffffff;
    font-weight: bold;
}

.cost-item-type {
    color: #cccccc;
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
}

.cost-item-amount {
    color: #ffaa00;
    text-align: right;
    font-weight: bold;
}

.cost-total {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
}

.cost-total .cost-item-name,
.cost-total .cost-item-amount {
    color: #00ff88;
    font-size: 16px;
}

/* Aggregated Materials Summary */
.aggregated-materials-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.aggregated-material-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: border-color 0.2s ease;
}

.aggregated-material-item:hover {
    border-color: rgba(0, 255, 255, 0.3);
}

.aggregated-material-icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #00ffff;
    background: rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.aggregated-material-info {
    flex: 1;
    min-width: 0;
}

.aggregated-material-name {
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aggregated-material-details {
    color: #cccccc;
    font-size: 11px;
    line-height: 1.3;
}

.aggregated-material-total {
    color: #ffaa00;
    font-weight: bold;
    font-size: 12px;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 15px;
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.material-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid #00ffff;
    background: rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.material-icon:hover {
    transform: scale(1.1);
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 255, 255, 0.3);
    border-left: 4px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 18px;
    color: #cccccc;
}

.error-section {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.error-message {
    font-size: 18px;
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Manufacturing */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }
    
    .manufacturing-search-box {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .result-name {
        font-size: 24px;
    }
    
    .cost-amount {
        font-size: 20px;
    }
    
    .materials-grid {
        grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
        gap: 10px;
    }
    
    .material-icon {
        width: 40px;
        height: 40px;
    }
}

/* Success Rate Section Styles */
.success-rate-section {
    margin-bottom: 30px;
}

.success-rate-section h3 {
    color: #00ffff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

.decryptor-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.decryptor-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #ffffff;
    font-size: 16px;
}

.decryptor-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00ffff;
}

.success-rate-info {
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.blueprint-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.blueprint-name {
    color: #00ffff;
    font-weight: bold;
    font-size: 16px;
}

.base-rate {
    color: #ffffff;
    background: rgba(0, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.decryptor-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.decryptor-amount {
    color: #ffffff;
    font-size: 14px;
}

.decryptor-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.decryptor-status.active {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.decryptor-status:not(.active) {
    background: rgba(255, 0, 0, 0.1);
    color: #ff6666;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.bonuses-breakdown {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.bonuses-breakdown h4 {
    color: #00ffff;
    margin-bottom: 10px;
    font-size: 14px;
}

.bonus-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.05);
}

.bonus-item:last-child {
    border-bottom: none;
}

.bonus-label {
    color: #ffffff;
    font-size: 13px;
}

.bonus-value {
    color: #00ffff;
    font-size: 13px;
    font-weight: bold;
}

.debris-count {
    color: #ffffff;
    background: rgba(0, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.success-rates-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.skill-rate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.skill-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.rate-value {
    color: #00ffff;
    font-size: 16px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .success-rates-display {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .blueprint-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .decryptor-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Manufacturing Tab Styles */
.manufacturing-tabs {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.tab-btn {
    padding: 12px 24px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.tab-btn.active {
    background: rgba(0, 255, 255, 0.3);
    border-color: #00ffff;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.4);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Profitability Analysis Styles */
.profitability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.profitability-info h3 {
    font-size: 24px;
    color: #00ffff;
    margin-bottom: 8px;
}

.profitability-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.refresh-btn {
    padding: 10px 20px;
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid rgba(0, 255, 0, 0.4);
    color: #00ff00;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: rgba(0, 255, 0, 0.3);
    border-color: #00ff00;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
}

/* Profitability Categories - Single Column Layout */
.profitability-categories {
    margin-bottom: 30px;
}

.profitability-category {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    padding: 20px;
    margin-bottom: 20px;
}

.profitability-category h4 {
    font-size: 18px;
    color: #00ffff;
    margin-bottom: 15px;
    text-align: left;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.category-header:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.4);
}

.expand-icon {
    color: #00ffff;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.category-header.expanded .expand-icon {
    transform: rotate(90deg);
}

.category-name {
    flex-grow: 1;
    color: #ffffff;
    font-weight: bold;
}

.item-count {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.category-items {
    margin-top: 15px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    padding-top: 15px;
}

.loading-items {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 20px;
    font-style: italic;
}

/* Profitability Item Styles */
.profitability-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.profitability-item:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 255, 255, 0.3);
}

.profitability-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profitability-info {
    flex-grow: 1;
}

.profitability-name {
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.profitability-prices {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.manufacture-cost {
    color: rgba(255, 255, 255, 0.7);
}

.market-price {
    color: #ffaa00;
}

.profit-margin {
    font-weight: bold;
    font-size: 14px;
    min-width: 80px;
    text-align: right;
}

.profit-positive {
    color: #00ff00;
}

.profit-negative {
    color: #ff4444;
}

.profit-neutral {
    color: #ffaa00;
}

/* Loading and Error States */
.profitability-loading {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.profitability-error {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(255, 0, 0, 0.3);
}

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

.profitability-error .error-message {
    color: #ff4444;
    font-size: 16px;
}

/* Admin Panel Styles */
.admin-section {
    margin-top: 80px;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

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

.admin-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(20, 0, 0, 0.8);
    border-radius: 10px;
    border: 2px solid #ff4444;
    backdrop-filter: blur(10px);
}

.admin-header h1 {
    font-size: 48px;
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.admin-subtitle {
    font-size: 18px;
    color: #cccccc;
    opacity: 0.8;
}

.admin-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.admin-tab-btn {
    padding: 12px 24px;
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.admin-tab-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.6);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.admin-tab-btn.active {
    background: rgba(255, 68, 68, 0.3);
    border-color: #ff4444;
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
}

.admin-tab-content {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 2px solid rgba(255, 68, 68, 0.3);
    padding: 30px;
}

.users-header, .buyback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 68, 68, 0.3);
}

.users-header h3, .buyback-header h3 {
    color: #ff4444;
    font-size: 24px;
    margin: 0;
}

.users-count {
    color: #ffffff;
    font-size: 16px;
    opacity: 0.8;
}

.buyback-subtitle {
    color: #cccccc;
    font-size: 14px;
    opacity: 0.8;
}

.users-table-header, .buyback-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.2) 0%, rgba(200, 0, 0, 0.2) 100%);
    padding: 15px 20px;
    font-weight: bold;
    color: #ff4444;
    border-radius: 8px;
    margin-bottom: 15px;
}

.buyback-table-header {
    grid-template-columns: 80px 2fr 1fr 1fr;
}

.user-row, .buyback-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    margin-bottom: 10px;
    align-items: center;
    transition: all 0.3s ease;
}

.buyback-row {
    grid-template-columns: 80px 2fr 1fr 1fr;
}

.user-row:hover, .buyback-row:hover {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.user-col-username, .buyback-col-username {
    color: #ffffff;
    font-weight: bold;
}

.user-col-created {
    color: #cccccc;
    font-size: 14px;
}

.buyback-col-rank {
    color: #00ffff;
    font-weight: bold;
    text-align: center;
}

.buyback-col-total {
    color: #00ff88;
    font-weight: bold;
}

.btn-change-password, .btn-modify-total {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-change-password:hover, .btn-modify-total:hover {
    background: linear-gradient(135deg, #cc0000, #ff4444);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.loading-users, .loading-buyback {
    text-align: center;
    padding: 40px;
    color: #ff4444;
    font-size: 18px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .manufacturing-tabs {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .tab-btn {
        width: 200px;
        text-align: center;
    }
    
    .profitability-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .filter-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profitability-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .profit-margin {
        min-width: auto;
        text-align: center;
    }
}
}