@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #06070d;
    --bg-card: rgba(13, 17, 28, 0.7);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(56, 189, 248, 0.3);
    
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.25);
    --secondary: #a855f7;
    --secondary-glow: rgba(168, 85, 247, 0.25);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);
    --error: #ef4444;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Glows */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: pulse 12s infinite alternate ease-in-out;
}

.bg-glow-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -50px;
    right: -100px;
}

.bg-glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    bottom: -100px;
    left: -200px;
    animation-delay: -3s;
}

.bg-glow-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -6s;
}

@keyframes pulse {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(40px, -40px) scale(1.15);
    }
}

/* App Container */
.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 24px 16px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 4px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Buttons */
.btn {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-connect {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-connect:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #06070d;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.35);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

.btn-claim {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 6px;
}

.btn-claim:hover:not(:disabled) {
    box-shadow: 0 0 12px var(--success-glow);
    filter: brightness(1.1);
}

.btn-claim:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dark);
    cursor: not-allowed;
}

.btn-action-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 6px;
}

.btn-action-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.05);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.locked-icon {
    background: rgba(56, 189, 248, 0.1);
}
.locked-icon::before {
    content: '🔒';
    font-size: 20px;
}

.active-icon {
    background: rgba(168, 85, 247, 0.1);
}
.active-icon::before {
    content: '📊';
    font-size: 20px;
}

.claimable-icon {
    background: rgba(16, 185, 129, 0.1);
}
.claimable-icon::before {
    content: '💰';
    font-size: 20px;
}

.stat-info h3 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info p {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

/* Workspace Grid */
.workspace-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.9fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 992px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

/* Glass Panels */
.panel {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
}

.panel-header {
    margin-bottom: 24px;
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.panel-header p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Tabs */
.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(0, 0, 0, 0.4);
}

input::placeholder {
    color: var(--text-dark);
}

.input-hint {
    display: block;
    font-size: 11px;
    color: var(--text-dark);
    margin-top: 6px;
}

.hidden {
    display: none !important;
}

/* Info Box */
.info-box {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
}

.warning-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid var(--warning-glow);
    color: var(--warning);
}

/* Locks List Header */
.panel-header-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.list-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-title h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
}

.badge-count {
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.filter-controls {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    border-color: var(--border-hover);
    color: #fff;
}

.filter-btn.active {
    background: var(--primary-glow);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--primary);
}

/* Locks List Container */
.locks-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.locks-container::-webkit-scrollbar {
    width: 6px;
}

.locks-container::-webkit-scrollbar-track {
    background: transparent;
}

.locks-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.locks-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Loading & Empty States */
.loading-state, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

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

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: 0.6;
}

/* Lock Cards */
.lock-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.lock-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.03);
}

.lock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 14px;
}

.lock-title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lock-desc {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.lock-details-short {
    font-size: 12px;
    color: var(--text-muted);
}

.badge-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-locked {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-vesting {
    background: rgba(168, 85, 247, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.status-unlocked {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.lock-card-body {
    margin-bottom: 16px;
}

/* Progress bar inside card */
.progress-container {
    margin-bottom: 14px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

.lock-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 12px;
    margin-top: 12px;
}

.meta-item span {
    display: block;
    color: var(--text-dark);
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.meta-item p {
    color: var(--text-main);
    font-family: monospace;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lock-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* Modal Dialog */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #0d111c;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover {
    color: #fff;
}

.modal-body p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}
