:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --teal: #17a2b8;
}

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

html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    color: #1a3a52;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

/* Navbar Styling */
.navbar {
    transition: all 0.3s ease;
}

.navbar:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Hero Section Styling */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(23, 162, 184, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(32, 201, 151, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section .col-lg-6:first-child {
    animation: slideInLeft 0.8s ease-out;
}

.hero-section .col-lg-6:last-child {
    animation: slideInRight 0.8s ease-out;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Card Styling */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(23, 162, 184, 0.15) !important;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

/* Form Styling */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
}

.form-label {
    color: #1a3a52;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.alert {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

#priceDisplay {
    background-color: #e3f2fd;
    color: var(--primary-color);
}

#totalDisplay {
    background-color: #e8f5e9;
    color: var(--success-color);
}

#cartTotal {
    color: var(--success-color);
    font-size: 1.1rem;
}

/* Button Styling */
.btn {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn-primary { 
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.btn-success { 
    background-color: var(--success-color);
    color: white;
}

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

.btn-warning { 
    background-color: var(--warning-color); 
    color: #000; 
}

.btn-warning:hover { 
    background-color: #ffb800; 
}

.btn-lg { 
    padding: 0.9rem 2.5rem; 
    font-size: 1rem; 
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f8f9fb;
    font-weight: 600;
    color: #1a3a52;
}

.edit-btn, .delete-btn {
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.edit-btn {
    background-color: var(--warning-color);
    color: #000;
}

.edit-btn:hover {
    background-color: #ffb800;
    transform: scale(1.05);
}

.delete-btn {
    background-color: var(--danger-color);
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

.table {
    font-size: 0.95rem;
    border-collapse: collapse;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.alert {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

#priceDisplay {
    background-color: #e7f3ff;
    color: var(--primary-color);
}

#totalDisplay {
    background-color: #d4edda;
    color: var(--success-color);
}

#cartTotal {
    color: var(--success-color);
    font-size: 1.1rem;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary { background-color: var(--primary-color); }
.btn-success { background-color: var(--success-color); }
.btn-warning { background-color: var(--warning-color); color: #000; }
.btn-warning:hover { background-color: #ffb800; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

.edit-btn, .delete-btn {
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.edit-btn {
    background-color: var(--warning-color);
    color: #000;
}

.edit-btn:hover {
    background-color: #ffb800;
    transform: scale(1.05);
}

.delete-btn {
    background-color: var(--danger-color);
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

.table {
    font-size: 0.95rem;
    border-collapse: collapse;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tfoot {
    font-weight: 600;
    background-color: #f8f9fa;
    border-top: 2px solid #dee2e6;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    .card { margin-bottom: 1.5rem; }
    .table { font-size: 0.85rem; }
    .btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
    .edit-btn, .delete-btn { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeIn 0.5s ease-in-out; }

/* Search Results Styling */
#itemSearchContainer {
    position: relative;
}

#itemSearch {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

#itemSearch::placeholder {
    color: #999;
}

#searchResults {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#searchResults.list-group {
    border-radius: 8px;
}

#searchResults .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

#searchResults .list-group-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.2rem;
}

#searchResults .list-group-item.active {
    background-color: #e3f2fd;
    border-left: 3px solid var(--primary-color);
    padding-left: 0.95rem;
    color: var(--primary-color);
    font-weight: 500;
}

#searchResults .list-group-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

#searchResults mark {
    background-color: #ffeb3b;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #0b5ed7; }

/* Footer Styling */
footer {
    background-color: #1a1a1a !important;
}

footer h5 {
    color: white !important;
}

footer p {
    color: #aaa !important;
}

footer a {
    color: #aaa !important;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white !important;
}

/* Search Results Styling */
#itemSearchContainer {
    position: relative;
}

#itemSearch {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

#itemSearch::placeholder {
    color: #999;
}

#searchResults {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#searchResults.list-group {
    border-radius: 8px;
}

#searchResults .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

#searchResults .list-group-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.2rem;
}

#searchResults .list-group-item.active {
    background-color: #e3f2fd;
    border-left: 3px solid var(--primary-color);
    padding-left: 0.95rem;
    color: var(--primary-color);
    font-weight: 500;
}

#searchResults .list-group-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

#searchResults mark {
    background-color: #ffeb3b;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
}