/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
}

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

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-links a:hover {
    background: var(--light-gray);
    color: var(--primary);
}

.nav-links a.active {
    background: var(--primary);
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.card-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.input-help {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary, .btn-outline, .btn-danger, .btn-warning {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #dee2e6;
}

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

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

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

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

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary);
    background: linear-gradient(120deg, #a8edea 0%, #fed6e3 100%);
    padding: 0 10px;
    border-radius: 5px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 500;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* IP Display */
.ip-display-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.ip-header {
    padding: 1rem 1.5rem;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ip-content {
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ip-address {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.btn-copy {
    background: var(--light-gray);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

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

/* Features */
.features {
    margin: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    font-size: 2rem;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

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

/* Response Display */
.response-card {
    animation: slideIn 0.5s ease;
}

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

.response-details {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.detail-row:last-child {
    border-bottom: none;
}

.code-value {
    font-family: monospace;
    font-weight: 600;
    color: var(--secondary);
    font-size: 1.1rem;
}

.json-viewer {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.json-viewer pre {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

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

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--dark);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1001;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: var(--light-gray);
    border-radius: 20px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
}

.status-dot.success {
    background: var(--success);
}

.status-dot.error {
    background: var(--danger);
}

/* Quick Actions */
.quick-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
}

.quick-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-quick {
    padding: 8px 16px;
    background: var(--light-gray);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* API Docs */
.api-docs {
    background: #f8f9fa;
}

.endpoint {
    display: inline-block;
    background: var(--dark);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-family: monospace;
    margin-bottom: 1rem;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Check Page Styles */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--border-radius);
}

.info-row i {
    font-size: 2rem;
    color: var(--primary);
}

.ip-display, .code-display, .expiry-display {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.action-section {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.history-table th {
    background: var(--light-gray);
    font-weight: 600;
}

.empty-history {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.instructions {
    padding-left: 1.5rem;
    line-height: 2;
}

.instructions li {
    margin-bottom: 1rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.system-info {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

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

.operation-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.operation-card h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logs-container {
    background: var(--dark);
    color: white;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.log-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.log-filters select,
.log-filters input {
    padding: 8px 12px;
    border: none;
    border-radius: var(--border-radius);
    background: #2d2d2d;
    color: white;
}

.logs-list {
    max-height: 300px;
    overflow-y: auto;
}

.log-entry {
    padding: 10px;
    border-bottom: 1px solid #444;
    font-family: monospace;
    font-size: 0.875rem;
}

.log-time {
    color: #888;
    margin-right: 10px;
}

.log-level {
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    margin-right: 10px;
}

.log-level.info {
    background: var(--primary);
    color: white;
}

.log-level.warning {
    background: var(--warning);
    color: white;
}

.log-level.error {
    background: var(--danger);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .stats {
        justify-content: center;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
}

@media (min-width: 769px) {
    .nav-mobile-toggle {
        display: none;
    }
}