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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #0f0f23 0%, #1a1a3e 100%);
    min-height: 100vh;
    color: #e4e4e7;
}

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

/* Header Styles */
.main-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 13px;
    color: #9ca3af;
}

.header-stats {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.stat-item {
    text-align: center;
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.stat-group-label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    text-align: center;
}

.stat-group .stat-item {
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.stat-value.online {
    color: #10b981;
}

.stat-value.offline {
    color: #ef4444;
}

.stat-value.unknown {
    color: #6b7280;
}

/* Control Panel */
.control-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-bottom: 24px;
}

.add-proxy-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
}

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

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.tooltip {
    font-size: 11px;
    color: #6b7280;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
}

.input-row {
    display: flex;
    gap: 8px;
}

#proxyInput {
    flex: 2;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

#expiryDate {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

#proxyInput:focus, #expiryDate:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(0, 0, 0, 0.5);
}

#proxyInput::placeholder, #expiryDate::placeholder {
    color: #6b7280;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}

.btn-add {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-batch {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-batch:hover {
    background: rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

.btn-batch.active {
    background: rgba(245, 158, 11, 0.4);
    border-color: #f59e0b;
}

.batch-add-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.batch-header {
    margin-bottom: 10px;
}

.batch-tip {
    font-size: 12px;
    color: #9ca3af;
}

#batchProxyInput {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Monaco', 'Courier New', monospace;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s;
}

#batchProxyInput:focus {
    outline: none;
    border-color: #f59e0b;
    background: rgba(0, 0, 0, 0.5);
}

#batchProxyInput::placeholder {
    color: #6b7280;
}

.batch-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

#batchExpiryDate {
    flex: 0 0 160px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

#batchExpiryDate:focus {
    outline: none;
    border-color: #f59e0b;
    background: rgba(0, 0, 0, 0.5);
}

.batch-count {
    font-size: 13px;
    color: #9ca3af;
    margin-left: auto;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.google:hover {
    background: rgba(66, 133, 244, 0.2);
    border-color: rgba(66, 133, 244, 0.3);
    color: #4285f4;
}

.action-btn.openai:hover {
    background: rgba(16, 163, 127, 0.2);
    border-color: rgba(16, 163, 127, 0.3);
    color: #10a37f;
}

.auto-check-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    font-size: 13px;
    color: #10b981;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Proxy Grid */
.proxy-grid-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    min-height: 400px;
}

.proxy-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.proxy-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
}

.proxy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6b7280;
}

.proxy-card.online::before {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.proxy-card.offline::before {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.proxy-card.checking::before {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.proxy-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.proxy-card.expired {
    opacity: 0.7;
}

.proxy-card.expiring-soon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ef4444 0%, #fbbf24 100%);
}

.proxy-card.expiring::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.proxy-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.proxy-address {
    font-size: 13px;
    font-weight: 500;
    color: #e4e4e7;
    word-break: break-all;
    line-height: 1.4;
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
}

.status-badges {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.service-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.service-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-badge.checking {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-badge.unknown {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.proxy-info {
    flex-shrink: 0;
}

.expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 11px;
    color: #9ca3af;
}

.expiry-badge.expired {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.expiry-badge.expiring-soon {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.expiry-badge.expiring {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.proxy-status-times {
    display: flex;
    gap: 16px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    flex-shrink: 0;
}

.status-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.status-time-label {
    font-size: 10px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

.status-time-value {
    font-size: 11px;
    color: #9ca3af;
}

.proxy-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.last-check-time {
    font-size: 11px;
    color: #6b7280;
}

.proxy-actions {
    display: flex;
    gap: 6px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.icon-btn.check:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

.icon-btn.check.ip {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    font-size: 10px;
    font-weight: 700;
    color: white;
    border: none;
}

.icon-btn.check.ip:hover {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

.real-ip-display {
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
}

.response-time {
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.response-time.fast {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.response-time.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.response-time.slow {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.ip-label {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.ip-value {
    font-size: 14px;
    color: #6366f1;
    font-weight: 600;
    font-family: 'Monaco', 'Courier New', monospace;
}

.ip-checking {
    font-size: 12px;
    color: #f59e0b;
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 4px;
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.icon-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.icon-btn.copy:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.icon-btn.google {
    font-size: 12px;
    font-weight: 600;
}

.icon-btn.google:hover {
    background: rgba(66, 133, 244, 0.2);
    border-color: rgba(66, 133, 244, 0.3);
    color: #4285f4;
}

.icon-btn.openai {
    font-size: 12px;
    font-weight: 600;
}

.icon-btn.openai:hover {
    background: rgba(16, 163, 127, 0.2);
    border-color: rgba(16, 163, 127, 0.3);
    color: #10a37f;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.empty-state svg {
    margin: 0 auto 20px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #9ca3af;
}

.empty-state p {
    font-size: 14px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .control-panel {
        grid-template-columns: 1fr;
    }
    
    .proxy-grid {
        grid-template-columns: 1fr;
    }
    
    .header-stats {
        width: 100%;
        justify-content: space-around;
    }
}