/* ============================================
   INVENTORY ZERO-ONE - Futuristic Cyber Theme
   ============================================ */

:root {
    /* Primary Colors */
    --bg-dark: #0a0a0f;
    --bg-medium: #12121a;
    --bg-light: #1a1a25;
    
    /* Accent Colors */
    --cyan: #00f0ff;
    --cyan-dim: #00a0aa;
    --magenta: #ff00ff;
    --magenta-dim: #aa00aa;
    --purple: #8b5cf6;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-dim: #606070;
    
    /* Effects */
    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.5);
    --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.5);
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.5);
    
    /* Gradients */
    --gradient-card: linear-gradient(135deg, rgba(26, 26, 37, 0.9) 0%, rgba(18, 18, 26, 0.95) 100%);
    --gradient-border: linear-gradient(135deg, var(--cyan) 0%, var(--magenta) 100%);
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.3;
    animation: scanLine 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scanLine {
    0% { top: -2px; }
    100% { top: 100%; }
}

/* ============================================
   HEADER
   ============================================ */

.main-header {
    position: relative;
    z-index: 10;
    padding: 20px 40px;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.95) 0%, transparent 100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

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

.logo-icon {
    width: 60px;
    height: 60px;
    color: var(--cyan);
    filter: drop-shadow(var(--glow-cyan));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.logo-svg {
    width: 100%;
    height: 100%;
}

.logo-text h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 8px;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--text-primary) 50%, var(--magenta) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: -5px;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-box {
    text-align: center;
    padding: 10px 25px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.05);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cyan);
    display: block;
    text-shadow: var(--glow-cyan);
}

.stat-label {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--text-secondary);
}

.header-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
    margin-top: 20px;
    opacity: 0.5;
}

/* ============================================
   INVENTORY GRID
   ============================================ */

.inventory-container {
    position: relative;
    z-index: 5;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ============================================
   ITEM CARDS
   ============================================ */

.item-card {
    position: relative;
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, transparent 50%, rgba(255, 0, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.item-card:hover::before {
    opacity: 1;
}

.item-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--cyan);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 240, 255, 0.2),
        inset 0 0 30px rgba(0, 240, 255, 0.05);
}

.item-card::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--cyan);
    border-right: 2px solid var(--cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover::after {
    opacity: 1;
}

.card-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg-dark);
}

/* Placeholder für nicht entdeckte Artefakte */
.card-image-container.no-image {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-dark) 100%);
}

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding-top: 30%;
    padding-left: 20px;
    padding-right: 20px;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 240, 255, 0.03) 2px,
            rgba(0, 240, 255, 0.03) 4px
        ),
        linear-gradient(135deg, rgba(10, 10, 15, 0.95) 0%, rgba(18, 18, 26, 0.9) 100%);
    animation: scanlines 8s linear infinite;
    z-index: 1;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

.placeholder-icon {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    color: var(--cyan);
    text-shadow: var(--glow-cyan);
    opacity: 0.8;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; text-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }
    50% { opacity: 1; text-shadow: 0 0 30px rgba(0, 240, 255, 0.6), 0 0 60px rgba(0, 240, 255, 0.3); }
}

.placeholder-text {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    margin-top: 10px;
    text-transform: uppercase;
}

.placeholder-status {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
    animation: pulse-glow 2s ease-in-out infinite;
}

.placeholder-note {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    color: var(--magenta);
    letter-spacing: 1px;
    margin-top: 8px;
    opacity: 0.9;
    text-transform: uppercase;
    animation: flicker 3s ease-in-out infinite;
    max-width: 90%;
}

@keyframes flicker {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
    52% { opacity: 0.4; }
    54% { opacity: 0.9; }
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.item-card:hover .card-image {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 15, 0.95) 100%);
    z-index: 2;
}

.card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    z-index: 3;
    clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

.card-rarity {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 0 10px currentColor;
}

.card-rarity.legendary { background: #ffd700; color: #ffd700; }
.card-rarity.epic { background: #a855f7; color: #a855f7; }
.card-rarity.rare { background: #3b82f6; color: #3b82f6; }
.card-rarity.common { background: #6b7280; color: #6b7280; }
.card-rarity.unknown { 
    background: transparent; 
    border: 2px solid var(--cyan);
    animation: pulse-unknown 2s ease-in-out infinite;
}
@keyframes pulse-unknown {
    0%, 100% { border-color: var(--cyan); box-shadow: 0 0 5px var(--cyan); }
    50% { border-color: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
}

.card-content {
    position: relative;
    padding: 20px;
    z-index: 3;
}

.card-id {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 8px 0;
    letter-spacing: 1px;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--cyan);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px var(--cyan); }
    50% { opacity: 0.5; box-shadow: 0 0 10px var(--cyan); }
}

.card-action {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.item-card:hover .card-action {
    color: var(--magenta);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--bg-medium);
    border: 1px solid rgba(0, 240, 255, 0.3);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff4444;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-height: calc(90vh - 40px);
    overflow-y: auto;
}

/* Modal Image Section */
.modal-image-section {
    position: relative;
    background: var(--bg-dark);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-image-frame {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    border: 2px solid rgba(0, 240, 255, 0.3);
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--cyan);
    border-style: solid;
}

.image-corner.top-left {
    top: -1px;
    left: -1px;
    border-width: 3px 0 0 3px;
}

.image-corner.top-right {
    top: -1px;
    right: -1px;
    border-width: 3px 3px 0 0;
}

.image-corner.bottom-left {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 3px 3px;
}

.image-corner.bottom-right {
    bottom: -1px;
    right: -1px;
    border-width: 0 3px 3px 0;
}

.modal-category {
    margin-top: 20px;
    padding: 8px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(255, 0, 255, 0.2) 100%);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--cyan);
}

/* Modal Info Section */
.modal-info-section {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

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

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-id {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.1);
    transition: all 0.3s ease;
}

.modal-stat:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
}

.stat-icon {
    width: 35px;
    height: 35px;
    color: var(--cyan);
    opacity: 0.8;
}

.stat-icon svg {
    width: 100%;
    height: 100%;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-title {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.stat-data {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Bonus Effekt Styling */
.modal-stat.bonus-effect {
    background: rgba(255, 215, 0, 0.08);
    border-color: rgba(255, 215, 0, 0.2);
}

.modal-stat.bonus-effect:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
}

.modal-stat.bonus-effect .stat-icon {
    color: #ffd700;
}

.stat-data.bonus-text {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.modal-notes {
    margin-top: auto;
    padding: 20px;
    background: rgba(139, 92, 246, 0.05);
    border-left: 3px solid var(--purple);
}

.modal-notes h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--purple);
    margin-bottom: 10px;
}

.modal-notes p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-footer {
    padding: 15px 30px;
    background: var(--bg-dark);
}

.tech-line {
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent 30%, transparent 70%, var(--magenta));
    opacity: 0.5;
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
    position: relative;
    z-index: 10;
    padding: 20px 40px;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.95) 100%);
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-dim);
}

.footer-status {
    font-size: 0.75rem;
    color: #00ff88;
    letter-spacing: 2px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 900px) {
    .modal-content {
        grid-template-columns: 1fr;
    }
    
    .modal-image-section {
        padding: 20px;
    }
    
    .modal-image-frame {
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 15px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
        letter-spacing: 4px;
    }
    
    .inventory-container {
        padding: 20px;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-title {
        font-size: 1.4rem;
    }
    
    .modal-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .card-content {
        padding: 12px;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .header-stats {
        gap: 15px;
    }
    
    .stat-box {
        padding: 8px 15px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--cyan-dim);
    border-radius: 4px;
}

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