/* Global Styles */
:root {
    --primary-color: #05D8E8;
    --secondary-color: #FF00AA;
    --dark-bg: #121212;
    --medium-bg: #1E1E1E;
    --light-bg: #2D2D2D;
    --text-color: #FFFFFF;
    --border-radius: 8px;
    --box-shadow: 0 4px 20px rgba(5, 216, 232, 0.2);
    --neon-glow: 0 0 10px rgba(5, 216, 232, 0.5), 0 0 20px rgba(5, 216, 232, 0.3);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 0, 170, 0.1), transparent 60%),
                radial-gradient(circle at bottom left, rgba(5, 216, 232, 0.1), transparent 60%);
    z-index: -1;
}

/* Grid pattern for background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(30, 30, 30, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 30, 30, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
}

.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    color: var(--secondary-color);
    text-shadow: var(--neon-glow);
}

button, .btn {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--box-shadow);
    display: inline-block;
    text-align: center;
}

/* Ensure anchor tags with .btn class have text color that overrides the default anchor color */
a.btn {
    color: var(--text-color);
    text-decoration: none;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(5, 216, 232, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--text-color); /* Keep text white on hover */
}

/* Header Styles */
header {
    background-color: var(--medium-bg);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(5, 216, 232, 0.3);
    box-shadow: 0 2px 15px rgba(5, 216, 232, 0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--primary-color);
    font-size: 2rem;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: nowrap;
}

nav a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.3s;
    white-space: nowrap;
}

nav a i {
    margin-right: 5px;
}

nav a:hover {
    background-color: var(--light-bg);
}

/* Footer Styles */
footer {
    background-color: var(--medium-bg);
    color: var(--text-color);
    padding: 40px 20px 20px;
    border-top: 1px solid rgba(5, 216, 232, 0.3);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-bg);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Styles */
.form-container {
    background-color: var(--medium-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    max-width: 600px;
    margin: 30px auto;
    position: relative;
    overflow: hidden;
}

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

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--light-bg);
    border: 1px solid rgba(5, 216, 232, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-color);
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(5, 216, 232, 0.2);
}

/* Card Styles */
.card {
    background-color: var(--medium-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(5, 216, 232, 0.3);
}

.card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-header h3 {
    margin-bottom: 0;
}

.card-body {
    margin-bottom: 15px;
}

.card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Device Status Indicator */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-active {
    background-color: #00ff4c;
    box-shadow: 0 0 10px rgba(0, 255, 76, 0.7);
}

.status-inactive {
    background-color: #ff9900;
    box-shadow: 0 0 10px rgba(255, 153, 0, 0.7);
}

.status-lost {
    background-color: #ff0033;
    box-shadow: 0 0 10px rgba(255, 0, 51, 0.7);
}

/* Map Container */
.map-container {
    height: 400px;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(5, 216, 232, 0.3);
}

/* Hero Section */
.hero {
    text-align: center;
    margin: 50px 0;
    padding: 50px 20px;
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature-card {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Animation for Loading */
@keyframes loadingPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.loading {
    animation: loadingPulse 1.5s infinite;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    background-color: rgba(5, 216, 232, 0.1);
}

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

.alert-error {
    border-color: #ff0033;
    background-color: rgba(255, 0, 51, 0.1);
}

.alert-warning {
    border-color: #ff9900;
    background-color: rgba(255, 153, 0, 0.1);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: var(--medium-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
}

thead th {
    background-color: var(--light-bg);
    padding: 12px 15px;
    text-align: left;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(5, 216, 232, 0.3);
}

tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s;
}

tbody tr:hover {
    background-color: rgba(5, 216, 232, 0.05);
}

tbody td {
    padding: 12px 15px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    background-color: var(--medium-bg);
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--light-bg);
}

.pagination .active {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}
