* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(20, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.header h1 {
    color: #00ffff;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.header p {
    color: #a0e0e0;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.wallet-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.wallet-info span {
    background: rgba(0, 255, 255, 0.15);
    color: #00ffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.main-content {
    background: rgba(20, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.2);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: rgba(15, 25, 35, 0.8);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    padding: 20px 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #7a9aa5;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: rgba(0, 255, 255, 0.1);
    color: #00e5e5;
}

.tab-button.active {
    color: #00ffff;
    border-bottom-color: #00ffff;
    background: rgba(0, 255, 255, 0.05);
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: #00ffff;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #006666 0%, #00cccc 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #00ffff;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: rgba(30, 40, 50, 0.8);
    color: #e0e0e0;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #006666 0%, #00cccc 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.5);
    background: linear-gradient(135deg, #007777 0%, #00dddd 100%);
}

.btn-secondary {
    background: rgba(0, 150, 150, 0.8);
    color: white;
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(0, 180, 180, 0.9);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
}

.devices-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.device-card {
    background: rgba(30, 40, 50, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.device-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
    border-color: #00ffff;
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.device-header h3 {
    color: #00ffff;
    font-size: 1.2rem;
    margin: 0;
}

.device-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.device-status.active {
    background: rgba(0, 255, 100, 0.2);
    color: #00ff66;
    border: 1px solid rgba(0, 255, 100, 0.3);
}

.device-status.inactive {
    background: rgba(255, 50, 50, 0.2);
    color: #ff6666;
    border: 1px solid rgba(255, 50, 50, 0.3);
}

.device-info p {
    margin-bottom: 8px;
    color: #a0c0d0;
    font-size: 0.9rem;
}

.device-actions {
    margin-top: 15px;
    text-align: center;
}

.records-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.record-card {
    background: rgba(30, 40, 50, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.record-header h4 {
    color: #00ffff;
    font-size: 1rem;
    margin: 0;
}

.data-type {
    background: rgba(0, 200, 255, 0.2);
    color: #00ccff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(0, 200, 255, 0.3);
}

.record-info p {
    margin-bottom: 6px;
    color: #a0c0d0;
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    color: #7a9aa5;
    font-style: italic;
    padding: 40px;
    background: rgba(30, 40, 50, 0.5);
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: white;
    margin-top: 20px;
    font-size: 1.1rem;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-button {
        padding: 15px 20px;
        font-size: 0.9rem;
    }

    .tab-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .devices-list {
        grid-template-columns: 1fr;
    }

    .records-list {
        grid-template-columns: 1fr;
    }

    .wallet-section {
        flex-direction: column;
        gap: 15px;
    }
}