/* Task4Gift Gaming Theme CSS */
/* Dark Gaming UI with Neon Effects */

:root {
    --primary-color: #ff0000;
    --secondary-color: #000000;
    --accent-color: #ff3333;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --bg-card: #1a1a1a;
    --border-color: #333333;
    --neon-glow: 0 0 20px rgba(255, 0, 0, 0.5);
    --neon-glow-intense: 0 0 30px rgba(255, 0, 0, 0.8);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a0000 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Admin Panel Specific Styles */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-darker);
    border-right: 2px solid var(--primary-color);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.admin-logo {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.admin-logo h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.5rem;
    text-shadow: var(--neon-glow);
}

.admin-nav {
    list-style: none;
    padding: 0;
}

.admin-nav li {
    margin: 0.5rem 0;
}

.admin-nav a {
    display: block;
    padding: 1rem 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: var(--primary-color);
    background: rgba(255, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    background: var(--bg-dark);
}

.admin-header {
    background: var(--bg-card);
    padding: 1rem 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.1);
}

.admin-content {
    margin-left: 250px;
    padding: 2rem;
    background: var(--bg-dark);
    min-height: 100vh;
}

/* Admin content wrapper for better organization */
.admin-content-wrapper {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 100%;
    overflow-x: auto;
}

/* Fix scrollbar styling */
.admin-content {
    overflow-x: hidden;
}

/* Ensure proper spacing and layout */
.admin-content .content-section {
    margin-bottom: 2rem;
    overflow: visible;
}

/* Table and list improvements */
.admin-content table,
.admin-content .table-container,
.admin-content .list-container {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

/* Form improvements */
.admin-content .form-container {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    max-width: 100%;
    overflow: visible;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-darker);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-glow-intense);
}

.stat-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.stat-card p {
    color: var(--text-secondary);
    margin: 0;
}

.table-container {
    background: var(--bg-darker);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-card);
    color: var(--primary-color);
    font-weight: bold;
}

.table tr:hover {
    background: rgba(255, 0, 0, 0.05);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn:hover {
    background: var(--accent-color);
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--neon-glow);
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-success {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    color: #00ff00;
}

.alert-error {
    background: rgba(255, 0, 0, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.card {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-darker);
}

.card-body {
    padding: 1.5rem;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main,
    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }

    .admin-content-wrapper {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 0.5rem;
    }

    .admin-content {
        padding: 1rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

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

/* Header Styles */
.header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-badge {
    background: var(--primary-color);
    color: var(--text-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: var(--neon-glow);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(255, 0, 0, 0.1);
    box-shadow: var(--neon-glow);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover;
    opacity: 0.3;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--neon-glow-intense);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    }

    to {
        text-shadow: 0 0 30px rgba(255, 0, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.6);
    }
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.device-showcase {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.device {
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

.device:nth-child(2) {
    animation-delay: 1s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.device-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--neon-glow-intense);
    font-size: 2rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--neon-glow);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--neon-glow-intense);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-primary);
}

/* Gift Cards Grid */
.gifts-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gift-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gift-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.gift-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-glow);
    border-color: var(--primary-color);
}

.gift-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--neon-glow);
}

.gift-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.gift-value {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.gift-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Filter Bar */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 2px solid var(--primary-color);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Fire Tongues Animation */
.fire-tongues {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--primary-color) 10%,
            var(--accent-color) 20%,
            transparent 30%,
            transparent 40%,
            var(--primary-color) 50%,
            var(--accent-color) 60%,
            transparent 70%,
            transparent 80%,
            var(--primary-color) 90%,
            var(--accent-color) 100%);
    background-size: 200% 100%;
    animation: fire 3s linear infinite;
    z-index: 999;
}

@keyframes fire {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        position: relative;
        justify-content: flex-start !important;
    }

    .header-content .logo {
        margin-right: auto;
    }

    /* Hide desktop navigation on mobile */
    .main-nav:not(.open) {
        display: none;
    }

    /* Hamburger button will be shown via inline styles */

    .hero h1 {
        font-size: 2.5rem;
    }

    .device-showcase {
        gap: 2rem;
    }

    .gifts-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 15px;
    z-index: 1001;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: var(--primary-color, #ff0000);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-dark, #0a0a0a);
        z-index: 1000;
        transition: right 0.3s ease;
        padding: 80px 20px 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .main-nav.open {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color, #333);
        width: 100%;
        font-size: 1.1rem;
    }

    .header-content {
        position: relative;
        justify-content: flex-start !important;
    }

    .header-content .logo {
        margin-right: auto;
    }
}

.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-backdrop.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .main-nav:not(.open) {
        display: none;
    }
}

body.mobile-menu-open {
    overflow: hidden;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--neon-glow-intense);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: var(--text-primary);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    max-width: 300px;
    z-index: 3000;
    box-shadow: var(--neon-glow);
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.notification.error {
    border-color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}