* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* === ANIMATED BACKGROUND === */
.bg-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    background: #fff;
    top: 10%;
    left: 10%;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    background: #ffd700;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    background: #00ff88;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* === HEADER === */
header {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    padding: 25px 0;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    text-align: center;
}

.logo {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.tagline {
    color: #666;
    font-size: 15px;
    font-style: italic;
}

/* === NAVIGATION === */
nav {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 99;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-links li a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.badge-cart {
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
}

.nav-user {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-admin,
.btn-logout,
.btn-login {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-admin {
    background: #4CAF50;
    color: white;
}

.btn-logout {
    background: #e53935;
    color: white;
}

.btn-login {
    background: white;
    color: #667eea;
}

.btn-admin:hover,
.btn-logout:hover,
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* === CONTAINER & LAYOUT === */
.container {
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    gap: 30px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* === SIDEBAR === */
.sidebar {
    flex: 0 0 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    height: fit-content;
    position: sticky;
    top: 100px;
    animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 15px;
    margin: 8px 0;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    color: #333;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(10px);
    border-left-color: #ffd700;
}

.sidebar hr {
    border: none;
    border-top: 2px dashed #ddd;
    margin: 20px 0;
}

.badge {
    background: #ff4757;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === HERO SECTION === */
.hero-section {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 20px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 42px;
    color: #667eea;
    margin-bottom: 15px;
}

.hero-text {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
}

.section-title {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* === PRODUCT GRID === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-card {
    background: linear-gradient(135deg, #f8f9ff, #fff);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.product-icon {
    font-size: 60px;
    text-align: center;
    margin-bottom: 15px;
}

.product-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 700;
}

.product-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    min-height: 60px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: #764ba2;
    margin: 15px 0;
}

.product-stock {
    font-size: 14px;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
}

.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.low-stock {
    background: #ffebee;
    color: #c62828;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* === BUTTONS === */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349, #f45c43);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    color: white;
}

.btn-cart {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    flex: 1;
}

.btn-buy {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    flex: 1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-large {
    padding: 15px 40px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* === CART PAGE === */
.cart-page {
    animation: fadeInUp 0.6s ease-out;
}

.cart-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
}

.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.cart-table thead tr {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.cart-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-table tbody tr:hover {
    background: #f8f9ff;
}

.cart-total {
    background: #f8f9ff;
    font-weight: 700;
}

.total-price {
    font-size: 24px;
    color: #764ba2;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

/* === CHECKOUT PAGE === */
.checkout-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.checkout-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: zoomIn 0.6s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.order-summary {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.order-summary h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.checkout-table {
    width: 100%;
}

.checkout-table td {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.total-row {
    font-size: 18px;
}

.total-row td {
    border-top: 3px solid #667eea;
    padding-top: 15px;
}

.checkout-form {
    margin-top: 30px;
}

.payment-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #2196f3;
}

.checkout-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

/* === LOGIN PAGE === */
.login-container {
    max-width: 500px;
    margin: 80px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: zoomIn 0.6s ease-out;
    text-align: center;
}

.login-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.demo-accounts {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 25px;
    text-align: left;
}

.demo-accounts h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.demo-accounts p {
    margin: 5px 0;
    font-size: 14px;
}

.login-footer {
    margin-top: 20px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

/* === FORMS === */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9ff;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* === ADMIN STYLES === */
.admin-container {
    animation: fadeInUp 0.6s ease-out;
}

.admin-header {
    margin-bottom: 30px;
}

.admin-subtitle {
    color: #666;
    margin-top: 10px;
}

.admin-actions {
    margin-bottom: 25px;
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.admin-table thead tr {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table tbody tr:hover {
    background: #f8f9ff;
}

.badge-id {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
}

.text-price {
    color: #764ba2;
    font-weight: 600;
}

.action-cell {
    white-space: nowrap;
}

.form-card {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.admin-form {
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.delete-confirm {
    background: #ffebee;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #ef5350;
}

/* === ALERTS === */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 500;
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #f57c00;
    border-left: 4px solid #ff9800;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 100px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 25px;
}

/* === CONTACT PAGE === */
.contact-page {
    animation: fadeInUp 0.6s ease-out;
}

.contact-card {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.contact-card h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.contact-card p {
    margin: 12px 0;
    font-size: 16px;
    color: #555;
}

/* === 404 ERROR === */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 120px;
    color: #667eea;
    margin-bottom: 20px;
}

.error-404 h2 {
    color: #764ba2;
    margin-bottom: 15px;
}

/* === FOOTER === */
footer {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    position: relative;
    z-index: 1;
}

.footer-content p {
    margin: 5px 0;
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 968px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        order: 2;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links li a {
        display: block;
        text-align: center;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .cart-actions,
    .checkout-actions,
    .form-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-section h1 {
        font-size: 28px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .login-card,
    .checkout-card {
        padding: 30px 20px;
    }
    
    .admin-table {
        font-size: 13px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}