:root {
    --gamer-accent: #00ffff;
    --gamer-accent-glow: rgba(0, 255, 255, 0.25);
    --bg-dark: #12121e;
    --surface-dark: #1e1e2f;
    --text-light: #e0e0ff;
    --shadow-dark: rgba(0, 0, 0, 0.8);
    --shadow-light: rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px;
    padding-top: 140px;
    /* Added space for navbar */
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
    overflow-x: hidden;
    min-height: 100vh;
    padding-bottom: 100px;
}

p,
li {
    font-size: 18px;
    line-height: 1.6;
}

.container-fluid {
    padding: 0;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1500px;
}

#monitor-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    z-index: 10;
    margin-top: 20px;
    position: relative;
    width: 100%;
}

#monitor-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
    display: block;
    perspective: 1200px;
    margin-top: 10px;
    transform-style: preserve-3d;
}

.monitor-screen {
    background-color: #1a1a1a;
    border: 8px solid #111;
    border-bottom: 12px solid #111;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--gamer-accent-glow), 0 15px 25px var(--shadow-dark);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);

    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 18px;
    font-weight: bold;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 0;
    backface-visibility: hidden;
}

#monitor {
    z-index: 10;
    left: 50%;
    transform: translateX(-50%) rotateX(-5deg);
    transform-origin: center bottom;
}

#monitor-2 {
    z-index: 9;
}

#table-overflow-warning {
    font-size: 16px;
    color: #ffc107;
    background: rgba(80, 50, 0, 0.85);
    border: 1px solid #ffc107;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    display: none;
    text-align: center;
    max-width: 420px;
    margin: 10px auto;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.table-area {
    width: 1200px;
    height: 525px;
    margin: -30px auto 0 auto;
    background-color: var(--surface-dark);
    z-index: 0;
    border: 2px solid #333;
    border-radius: 10px;
    position: relative;
    display: flex;
    transform: rotateX(20deg) translateZ(-100px);
    transform-origin: center bottom;
    box-shadow: 0 20px 40px var(--shadow-dark), inset 0 0 15px rgba(0, 0, 0, 0.5), 0 0 25px var(--gamer-accent-glow);
    background-size: cover;
    background-position: center;
    transition: width 0.4s ease-in-out, height 0.4s ease-in-out, transform 0.4s;
    overflow: visible;
}

.table-area.koyu-ahsap-masa {
    background-image: url('masa/koyu-ahsap-masa.png');
    background-color: #3b2a1a;
    border-color: #3b2a1a;
}

.table-area.ahsap-masa {
    background-image: url('masa/ahsap-masa.png');
    background-color: #ffffff;
    border-color: #c0c0c0;
    box-shadow: 0 20px 40px var(--shadow-light);
}

.table-area.acik-ahsap-masa {
    background-image: url('masa/acik-ahsap-masa.png');
    background-color: #a18a6c;
    border-color: #a18a6c;
    box-shadow: 0 20px 40px var(--shadow-light);
}

.table-area.antrasit-masa {
    background-color: #222;
    border-color: #222;
}

.table-area.siyah-masa {
    background-color: #131313;
    border-color: #000;
}

.table-area.beyaz-masa {
    background-color: #c6c6c6;
    background-image: linear-gradient(180deg, #f2f2f2 0%, #e0e0e0 100%);
    border-color: #d4d4d4;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.draggable {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    touch-action: none;
    position: absolute;
    user-select: none;
    cursor: grab;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform .2s ease-in-out;

}

.draggable:not(.dragging):hover {
    transform: translateY(-3px) translateZ(10px);
}

.draggable:active,
.draggable.dragging {
    cursor: grabbing;
    filter: none !important;
    transition: none !important;
}

.keyboard {
    bottom: 30%;
    left: 35%;
    z-index: 2;
}

.mousepad {
    bottom: 20%;
    left: 50%;
    z-index: 1;
}


.mouse {
    bottom: 35%;
    left: 65%;
    z-index: 3;
}

.draggable img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    display: block;
    filter: drop-shadow(10px 10px 15px rgba(0, 0, 0, 0.5));
    transition: filter .2s ease-in-out;
}

.draggable:not(.dragging):hover img {
    filter: drop-shadow(8px 8px 20px var(--gamer-accent-glow));
}

body.view-2d .table-area {
    transform: none;
    box-shadow: 0 5px 15px var(--shadow-dark);
    margin-top: 20px;
}

body.view-2d .draggable {
    transform-style: flat;
}

#rotate-controls {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;

    background: rgba(30, 30, 47, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gamer-accent);
    border-radius: 50px;
    padding: 10px 25px;

    display: none;
    align-items: center;
    gap: 15px;

    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.8);
    user-select: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#selected-item-name {
    color: #e6e6e6;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 100px;
    text-align: center;
}

#rotate-controls button {
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--gamer-accent);
    background: rgba(0, 0, 0, 0.3);
    color: var(--gamer-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#rotate-controls button:hover {
    background-color: var(--gamer-accent);
    color: var(--bg-dark);
    box-shadow: 0 0 8px var(--gamer-accent);
    transform: scale(1.1);
}

.result-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: var(--surface-dark);
    border: 1px solid var(--gamer-accent);
    border-radius: 0 0 8px 8px;
    z-index: 1001;
    box-shadow: 0 8px 15px var(--shadow-dark);
}

.result-item {
    padding: 8px 12px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
}

.result-item:hover {
    background-color: var(--gamer-accent);
    color: var(--bg-dark);
}

.theme-controls {
    background: rgba(30, 30, 47, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid var(--gamer-accent);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 10px var(--gamer-accent-glow);
}

.theme-controls label {
    font-size: 13px;
    font-weight: bold;
    color: var(--gamer-accent);
    margin-bottom: 3px;
    display: block;
}

.theme-controls select.form-select {
    background-color: var(--surface-dark);
    color: var(--text-light);
    border-color: var(--gamer-accent);
    font-size: 13px;
}

#monitor-area select.form-select {
    background-color: var(--surface-dark);
    color: var(--text-light);
    border-color: var(--gamer-accent);
    font-size: 13px;
}

#monitor-area .input-group-text {
    background-color: rgba(30, 30, 47, 0.9);
    color: var(--gamer-accent);
    border-color: var(--gamer-accent);
    font-size: 13px;
    font-weight: bold;
}

.top-controls-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.top-controls-container>* {
    pointer-events: auto;
}

#sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: top right;
}

#sidebar-content.collapsed {
    display: none;
}

#sidebar-toggle {
    margin-bottom: 10px;
    z-index: 1001;
}

.monitor-controls {
    margin-top: 2%;
    background: rgba(30, 30, 47, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid var(--gamer-accent);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 10px var(--gamer-accent-glow);
    width: 250px;
    flex-shrink: 0;
}

.search-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.purchase-link {
    margin-top: 10px;
    font-size: 12px;
    font-weight: bold;
    --bs-btn-bg: var(--gamer-accent);
    --bs-btn-border-color: var(--gamer-accent);
    --bs-btn-hover-bg: #33ffff;
    --bs-btn-color: var(--bg-dark);
    --bs-btn-hover-color: var(--bg-dark);
}

.placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gamer-accent);
    font-weight: bold;
    font-size: 16px;
    pointer-events: none;
    text-align: center;
    width: 100%;
}

.item-image {
    display: none;
}

.kreosus-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 40px;
    margin-top: 15px;
    background-color: #212529;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.kreosus-btn:hover {
    background-color: #2bc069;
    border-color: #2bc069;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(43, 192, 105, 0.4);
}

.kreosus-btn span {
    font-size: 18px;
    line-height: 1;
}

.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cart-summary-box {
    background: var(--surface-dark);
    border: 2px solid var(--gamer-accent);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8), 0 0 10px var(--gamer-accent-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    cursor: pointer;
    transition: transform 0.2s;
}

.cart-summary-box:hover {
    transform: scale(1.02);
}

.cart-summary-box label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 2px;
}

#cart-total-price {
    color: var(--gamer-accent);
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.cart-arrow {
    font-size: 12px;
    color: #fff;
    margin-top: 5px;
}

#cart-details-panel {
    display: none;
    position: absolute;
    bottom: 110%;
    right: 0;
    width: 320px;
    background: rgba(30, 30, 47, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gamer-accent);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.9);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    background: #000;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cart-item-info span:first-child {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-info span:last-child {
    font-size: 12px;
    color: var(--gamer-accent);
}

.btn-outline-light {
    --bs-btn-color: var(--text-light);
    --bs-btn-border-color: var(--text-light);
}

.btn-outline-light:hover {
    --bs-btn-hover-bg: var(--text-light);
    --bs-btn-hover-color: var(--bg-dark);
}

.navbar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: rgba(18, 18, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gamer-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    z-index: 9999;
    box-shadow: 0 0 15px var(--gamer-accent-glow);
}

.navbar-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.search-item-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-container .form-control {
    background-color: rgba(30, 30, 47, 0.9);
    border: 1px solid var(--gamer-accent);
    color: var(--text-light);
    height: 38px;
}

.navbar-container .btn {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0 !important;
}

.navbar-container .form-control::placeholder {
    color: rgba(224, 224, 255, 0.5);
}

.navbar-container .result-panel {
    top: 100%;
    margin-top: 5px;
    border-radius: 8px;
    max-height: 400px;
}

.top-controls-container {
    top: 120px;
}