@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800&display=swap');

:root {
    --bg-main: #fcf9f2;
    --bg-sidebar: #f0e9dd;
    --text-main: #5c4b42;
    --text-light: #8f7d73;
    --accent: #d89f67;
    --accent-hover: #c68648;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(92, 75, 66, 0.08);
    --border-color: #e6dcd0;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#root {
    height: 100%;
    width: 100%;
}

.game-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Utility Classes */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
}
@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: var(--bg-sidebar);
    border-left: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

@media (max-width: 768px) {
    .sidebar {
        width: 160px;
    }
}

/* Sidebar Actions for PC */
.sidebar-action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(139, 107, 93, 0.15);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 107, 93, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}

.sidebar-action-btn:hover {
    color: var(--accent);
    border-color: rgba(231, 125, 99, 0.3);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 107, 93, 0.12);
}

.sidebar-action-btn:active {
    transform: translateY(1px);
}

.sidebar-header {
    padding: 10px;
    background: rgba(255,255,255,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-header h2 {
    margin-bottom: 10px;
    font-weight: 800;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e2d7c8;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Shared Button Styles for Minimalist Look */
.danger-btn, .outline-danger-btn {
    flex: initial;
    padding: 6px 16px;
    border-radius: 50px; /* Pill shape */
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Sıfırla (Reset) Button */
.danger-btn {
    background: #555555;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(85, 85, 85, 0.15);
}

.danger-btn:hover {
    background: #333333;
    box-shadow: 0 4px 10px rgba(51, 51, 51, 0.25);
}

.danger-btn:active {
    box-shadow: none;
}

/* Temizle (Clear) Button */
.outline-danger-btn {
    background: transparent;
    color: #e77d63;
    box-shadow: inset 0 0 0 2px #e77d63;
}

.outline-danger-btn:hover {
    background: #fff;
    color: #e77d63;
    box-shadow: inset 0 0 0 2px #e77d63, 0 4px 10px rgba(231, 125, 99, 0.25);
}

.outline-danger-btn:active {
    box-shadow: none;
}

.inventory {
    flex: 1;
    overflow-y: auto;
    padding: 10px 5px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
    justify-items: center;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .inventory {
        grid-template-columns: repeat(1, 1fr);
        gap: 6px;
        padding-bottom: 90px; /* Allows scrolling past bottom toolbar */
    }
    .item-sidebar {
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 8px 10px 8px 0 !important; /* NO left padding */
        height: auto;
        min-height: 70px;
        border-radius: 12px;
    }
    .item-sidebar .item-image, .item-sidebar img {
        width: 60px !important;
        height: 60px !important;
        touch-action: none; /* Touching icon never scrolls, always drags */
        flex-shrink: 0;
        object-position: center !important;
        margin-left: 0 !important;
    }
    .item-sidebar .item-name {
        margin-top: 0 !important;
        margin-left: 5px !important;
        text-align: left !important;
        flex: 1;
        font-size: 0.8rem !important;
        line-height: 1.1 !important;
        touch-action: pan-y; /* Touching text allows vertical scrolling */
        word-break: break-word;
    }
    .item-sidebar .new-badge {
        right: auto !important;
        left: 2px !important;
        top: 2px !important;
        z-index: 2;
    }
    .item-sidebar:active .item-image,
    .item-sidebar:active .item-name,
    .item-sidebar:hover .item-image,
    .item-sidebar:hover .item-name {
        transform: none !important;
    }
}

/* Klavyenin alttaki menüyü yukarı itmesini engellemek için */
@media (max-height: 450px) {
    .bottom-toolbar.mobile-only {
        display: none !important;
    }
}

.inventory::-webkit-scrollbar { width: 8px; }
.inventory::-webkit-scrollbar-track { background: transparent; }
.inventory::-webkit-scrollbar-thumb {
    background-color: rgba(143, 125, 115, 0.3);
    border-radius: 4px;
}

/* Base Item */
.item-base {
    background: transparent;
    border: none;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    mix-blend-mode: multiply;
    transform: translate3d(0,0,0); /* Force hardware acceleration to fix iOS Safari blend mode bug */
}

/* Base item properties that depend on state */
.canvas-item {
    touch-action: none;
}

/* Sidebar Item */
.item-sidebar {
    cursor: grab;
    position: relative;
    touch-action: pan-y;
}
body.is-dragging-global .item-sidebar {
    pointer-events: none;
}

.item-sidebar .item-name {
    font-size: 0.85rem;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    text-align: center;
    width: 100%;
    line-height: 1.2;
}

.item-sidebar .item-image,
.item-sidebar .item-name,
.item-sidebar .new-badge {
    transition: transform 0.1s ease;
}

.item-sidebar:hover .item-image,
.item-sidebar:hover .item-name,
.item-sidebar:hover .new-badge {
    transform: translateY(-3px);
}

.item-sidebar:active .item-image {
    transform: scale(1.1) translateY(-3px);
}
.item-sidebar:active .item-name {
    transform: scale(1.05) translateY(-3px);
}
.item-sidebar.new-discovery {
    animation: pulse 1s;
    border-color: var(--accent);
}

.canvas-area {
    flex: 1;
    position: relative;
    background-color: #fcf6eb; /* Soft premium cream color */
    box-shadow: inset 0 0 100px rgba(180, 160, 140, 0.3); /* Soft warm inner shadow for depth */
    touch-action: none;
}

.canvas-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(143, 125, 115, 0.3);
    font-size: 2rem;
    font-weight: 800;
    pointer-events: none;
}
.canvas-bg-text span { font-size: 1rem; font-weight: 400; }

/* Canvas Item */
.canvas-item {
    position: absolute;
    z-index: 100;
    border: none;
    min-width: 60px;
    transform: translate(-50%, -50%);
    cursor: grab;
    box-shadow: none;
}

.canvas-item.dragging {
    z-index: 1000 !important;
    cursor: grabbing;
    box-shadow: none;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.canvas-item.combining {
    animation: combineWobble 0.3s ease-in-out;
}
.canvas-item.pop-in {
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.item-image { 
    width: 72px; 
    height: 72px; 
    margin-bottom: 5px; 
    pointer-events: none; 
    object-fit: contain;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Modern Checkbox */
.modern-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin: 0;
}

.modern-checkbox:hover {
    border-color: var(--accent);
}

.modern-checkbox:checked {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(216, 159, 103, 0.4);
}

.modern-checkbox:checked::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}
.item-name { 
    font-size: 0.95rem; 
    font-weight: 700; 
    text-align: center;
    color: var(--text-color);
    text-shadow: 0 1px 3px rgba(255,255,255,0.9), 0 0 6px rgba(255,255,255,0.8);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 15px var(--accent); }
    100% { transform: scale(1); }
}

@keyframes combineWobble {
    0% { transform: translate(-50%, -50%) scale(1); }
    25% { transform: translate(-50%, -50%) scale(1.2) rotate(10deg); }
    50% { transform: translate(-50%, -50%) scale(0.8) rotate(-10deg); }
    75% { transform: translate(-50%, -50%) scale(1.1) rotate(5deg); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    80% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .game-container { flex-direction: row; overflow: hidden; position: fixed; width: 100%; height: calc(100dvh - 75px); }
    .trash-bin { bottom: 20px; right: auto; left: 15px; padding: 15px; z-index: 900; }
}

.mobile-drawer-handle {
    display: none;
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%) translateX(-100%);
    width: 30px;
    height: 100px;
    background: var(--bg-sidebar);
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: 12px 0 0 12px;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    box-shadow: -5px 0 10px rgba(0,0,0,0.1);
}

.search-container {
    margin-top: 15px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 10px 10px 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-family: inherit;
    transition: all 0.2s;
}

.search-container i {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(168, 201, 156, 0.2);
}

/* Toast Notifications */
.toast-notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, fadeOut 0.5s ease-in 3.5s forwards;
    pointer-events: none;
    border: 2px solid rgba(0, 229, 255, 0.25);
}

@keyframes slideDown {
    from { top: -50px; opacity: 0; }
    to { top: var(--toast-top, 20px); opacity: 1; }
}

/* New Discovery Badge */
.new-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
    animation: badgePulse 1.5s infinite;
    pointer-events: none;
    border: 2px solid var(--bg-main);
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 0 10px rgba(255, 71, 87, 0.6); }
    100% { transform: scale(1); }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

/* --- Admin Panel Styles --- */
.admin-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-main);
    font-family: 'Nunito', sans-serif;
    user-select: text;
}
.admin-login-container * {
    user-select: text;
}

.admin-login-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    width: 340px;
    text-align: center;
    box-shadow: var(--card-shadow);
    color: var(--text-main);
}

.admin-login-card h2 {
    margin-top: 0;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-main);
}

.admin-login-card .input-group,
.admin-card .input-group {
    margin-bottom: 20px;
    text-align: left;
}

.admin-login-card input,
.admin-card input[type="text"],
.admin-card input[type="number"],
.admin-card select {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

.admin-login-card input:focus,
.admin-card input[type="text"]:focus,
.admin-card input[type="number"]:focus,
.admin-card select:focus {
    border-color: var(--accent);
}

/* Remove number input spin buttons */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

.admin-login-card .error-message {
    background: #ffe5e5;
    color: #d63031;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid #ffcccc;
}

.admin-login-card .button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.admin-login-card .login-btn,
.admin-card .login-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(255, 127, 80, 0.15);
}

.admin-login-card .login-btn:hover,
.admin-card .login-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 10px rgba(255, 127, 80, 0.4);
}

.admin-login-card .login-btn:active,
.admin-card .login-btn:active {
}

.admin-card .success-btn {
    background: #2ecc71;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.15);
}

.admin-card .success-btn:hover {
    background: #27ae60;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.25);
}

.admin-card .success-btn:active {
}


.admin-card .outline-accent-btn {
    background: #fff;
    color: #e77d63;
    border: none;
    box-shadow: inset 0 0 0 2px #e77d63;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-card .outline-accent-btn:hover {
    background: #fff;
    color: #e77d63;
    box-shadow: inset 0 0 0 2px #e77d63, 0 4px 10px rgba(231, 125, 99, 0.25);
}

.admin-card .outline-accent-btn:active {
}

.cancel-btn {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cancel-btn:hover {
    background: #f1f2f6;
    color: var(--text-main);
}

.cancel-btn:active {
}

/* --- Admin UI Styles --- */
.admin-layout {
    display: flex;
    height: 100vh;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Nunito', sans-serif;
    user-select: text;
}
.admin-layout * {
    user-select: text;
}

.admin-sidebar-menu {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.admin-sidebar-header {
    padding: 25px 20px;
    border-bottom: 2px solid var(--border-color);
}

.admin-sidebar-header h1 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 800;
}

.admin-nav {
    flex: 1;
    padding: 20px 10px;
}

.admin-nav-item {
    padding: 16px 20px;
    margin-bottom: 5px;
    cursor: pointer;
    font-weight: 800;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.15rem;
}

.admin-nav-item i {
    font-size: 1.5rem;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-main);
    transform: translateX(5px);
}

.admin-nav-item.active {
    background: #fff;
    color: var(--accent);
    box-shadow: var(--card-shadow);
}

.admin-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logout-btn {
    background: #e77d63;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 2px 6px rgba(231, 125, 99, 0.15);
}

.sidebar-logout-btn:hover {
    background: #d66a50;
    box-shadow: 0 4px 10px rgba(231, 125, 99, 0.25);
}

.sidebar-logout-btn:active {
}

.admin-page-content {
    padding: 40px;
    padding-bottom: 50vh;
    max-width: 100%;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Admin Cards */
.admin-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.admin-card h2 {
    margin-top: 0;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-weight: 800;
}

.yeni-malzeme-form {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Admin Tables */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-sidebar);
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    color: var(--text-light);
    font-size: 0.9rem;
}

.admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg-main);
}

.action-btn {
    background: #fff;
    color: var(--accent);
    border: 2px solid var(--border-color);
    padding: 10px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
}

.action-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(255, 127, 80, 0.25);
}

.back-btn {
    background: #fff;
    color: var(--text-main);
    border: 2px solid var(--border-color);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    font-weight: 700;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
}

.back-btn:hover {
    background: var(--bg-sidebar);
    transform: translateX(-3px);
}

.admin-pagination-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 2px solid var(--border-color);
}

.admin-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.admin-table-tools {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-end;
}

.searchable-option:hover {
    background-color: rgba(0, 229, 255, 0.25) !important;
}

.searchable-dropdown-list {
    overflow-y: scroll !important;
}
.searchable-dropdown-list::-webkit-scrollbar { width: 8px; }
.searchable-dropdown-list::-webkit-scrollbar-track { background: transparent; }
.searchable-dropdown-list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}
.searchable-dropdown-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent);
}

.danger-solid-btn {
    background: #e77d63;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 8px 22px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.danger-solid-btn:hover {
    background: #d66a50;
    box-shadow: 0 4px 10px rgba(231, 125, 99, 0.25);
}

button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Admin Panel Mobile - Bottom Navigation */
.mobile-only-icon {
    display: none;
}

.swipe-delete-btn {
    display: none !important;
}

.admin-mobile-header {
    display: none;
}

.recipe-flex {
    gap: 20px;
}

.recipe-index {
    font-size: 1.2rem;
    min-width: 30px;
}

@media (max-width: 768px) {
    .swipe-delete-btn {
        display: flex !important;
    }
    
    .admin-mobile-header {
        display: flex;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .recipe-flex {
        gap: 5px !important;
    }
    
    .recipe-index {
        font-size: 0.9rem !important;
        min-width: 15px !important;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 35px;
        align-items: center;
        background: var(--bg-sidebar);
        border-right: none;
        border-top: 2px solid var(--border-color);
        z-index: 1000;
        box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
        padding: 10px 0;
    }
    
    .admin-sidebar-header {
        display: none;
    }
    
    .admin-nav {
        display: contents;
    }
    
    .admin-nav-item {
        flex-direction: column;
        padding: 5px;
        gap: 5px;
        margin: 0;
        border-radius: 8px;
        color: var(--text-light);
        background: transparent !important;
        box-shadow: none !important;
        justify-content: center;
    }
    
    .admin-nav-item:hover {
        transform: none;
        background: transparent;
    }

    .admin-nav-item.active {
        color: var(--accent);
    }
    
    .admin-nav-item i {
        font-size: 2.2rem;
        font-weight: normal !important;
    }
    
    .nav-text, .logout-text, .hide-on-mobile {
        display: none !important;
    }
    
    /* Logout Container in Nav */
    .mobile-nav-logout-container {
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        justify-content: center;
    }

    .sidebar-logout-btn {
        background: transparent !important;
        color: var(--text-light) !important;
        box-shadow: none !important;
        padding: 5px !important;
        flex-direction: column;
        gap: 5px;
        border-radius: 8px !important;
        width: auto !important;
    }
    
    .sidebar-logout-btn:hover {
        transform: none;
        box-shadow: none !important;
    }
    
    .sidebar-logout-btn i {
        font-size: 2.2rem;
        font-weight: normal !important;
    }
    
    .mobile-only-icon {
        display: block !important;
    }
    
    .admin-main-area {
        height: calc(100vh - 75px);
        padding-bottom: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-page-content {
        padding: 20px;
        padding-bottom: 90px;
    }
    
    .admin-pagination-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .admin-table {
        min-width: 0 !important;
    }
    
    .admin-table-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-table-header.header-no-stack {
        flex-direction: row;
        align-items: center;
    }
    
    .admin-table-header.header-no-stack .admin-table-tools {
        width: auto;
        flex-direction: row;
    }
    
    .admin-table-header.header-no-stack .admin-table-tools button {
        width: auto !important;
    }
    
    .admin-table-tools {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .admin-table-tools > div {
        width: 100% !important;
    }
    
    .admin-table-tools select, 
    .admin-table-tools input, 
    .admin-table-tools button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    
    .yeni-malzeme-form {
        flex-direction: column;
    }
    
    .yeni-malzeme-form .input-group {
        min-width: 0 !important;
        width: 100%;
    }
}

/* Admin Dashboard Recipe List Items */
.recipe-list-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--bg-main);
    border-radius: 10px;
    gap: 10px;
}

.recipe-items-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

@media (max-width: 600px) {
    .recipe-list-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .recipe-items-group {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }
}

/* Bottom Toolbar - Matching Admin Mobile Menu */
.bottom-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(139, 107, 93, 0.15);
    border-radius: 20px 20px 0 0;
    z-index: 1000;
    box-shadow: 0 -5px 25px rgba(139, 107, 93, 0.05);
    padding: 0 15px;
}

.toolbar-btn {
    display: flex;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-main);
    justify-content: center;
    align-items: center;
    border: 1px solid transparent;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent);
    border-color: rgba(139, 107, 93, 0.15);
    box-shadow: 0 4px 15px rgba(139, 107, 93, 0.08);
    transform: translateY(-3px);
}

.toolbar-btn:active {
    transform: translateY(1px);
}

.toolbar-btn i {
    font-size: 2rem;
}

.toolbar-btn-text {
    display: none;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-main);
}
.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 600px) {
    .bottom-toolbar {
        padding: 10px 20px;
    }
}
