:root {
    --primary-color: #7C3AED;
    --secondary-color: #A78BFA;
    --accent-color: #8B5CF6;
    --background-color: #1E1B4B;
    --surface-color: #2E1065;
    --text-primary: #F3F4F6;
    --text-secondary: #E9D5FF;
    --border-color: #5B21B6;
    --shadow-color: rgba(124, 58, 237, 0.3);
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    --success-color: #10B981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px var(--shadow-color);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.tabs {
    display: flex;
    background: var(--surface-color);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px var(--shadow-color);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.tab-btn:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 16px var(--shadow-color);
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.stat-card h3 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.permissions-section {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow-color);
    border: 2px solid var(--border-color);
}

.permissions-section h3 {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.permission-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-container {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow-color);
    border: 2px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

.form-container h2 {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group input {
    flex: 1;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--background-color);
    color: var(--text-primary);
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: var(--primary-color);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.track-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tracking-results {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    min-height: 200px;
}

.result-card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.result-card h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.result-value {
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
}

.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.notification {
    background: var(--surface-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px var(--shadow-color);
    border-left: 4px solid var(--primary-color);
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid var(--primary-color);
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .tabs {
        flex-direction: column;
        gap: 8px;
    }

    .tab-btn {
        min-width: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .input-group {
        flex-direction: column;
    }

    .form-container {
        padding: 1.5rem;
    }

    .notifications {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 1.5rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .form-container {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .tabs,
    .notifications,
    .btn {
        display: none !important;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .tab-content {
        display: block !important;
    }
}