* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    padding: 20px;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

.time-bar {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 16px;
    padding: 12px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.time-display {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(103, 58, 183, 0.1);
    padding: 25px;
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-header i {
    font-size: 24px;
    color: #673ab7;
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.proxy-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f5ff;
    border-radius: 12px;
    padding: 14px 20px;
    margin: 15px 0;
    border: 1px solid #d6e4ff;
}

.toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: #007bff;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d0d0d0;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #4a6ee0, #673ab7);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.public-resource-tip {
    background: linear-gradient(135deg, #eef7ff, #e0eeff);
    color: #4a6ee0;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 18px;
    font-weight: 500;
    box-shadow: inset 0 0 8px rgba(74, 110, 224, 0.1);
    border: 1px solid #c0d7ff;
}

.public-resource-tip {
        background: linear-gradient(135deg, #007bff, #007bff);
        color: #a0c0ff;
        border: 1px solid #3a5a92;
    }

.btn {
    background: linear-gradient(135deg, #673ab7, #8561c5);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 25px;
    font-size: 18px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(103, 58, 183, 0.25);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(103, 58, 183, 0.3);
}

.btn:disabled {
    background: linear-gradient(135deg, #d0c0e8, #e0d6f0);
    box-shadow: none;
    cursor: not-allowed;
}

.info-text {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-top: 10px;
    padding: 0 15px;
}

.section-title {
    font-weight: 500;
    font-size: 16px;
    margin: 20px 0 10px;
    color: #555;
}

.log-container {
    background: #f0f2f5;
    border-radius: 12px;
    padding: 18px;
    min-height: 150px;
    max-height: 250px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 14px;
    color: #444;
}

.log-entry {
    padding: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.log-time {
    color: #888;
    min-width: 70px;
    font-size: 12px;
}

.log-message {
    flex-grow: 1;
}

.result-container {
    margin-top: 25px;
    display: none;
}

textarea.result-text {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: monospace;
    font-size: 13px;
    background: #f8f9fa;
    resize: none;
}

.copy-btn {
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 25px;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.copy-btn:active {
    transform: translateY(2px);
    background: #3d8b40;
}

.footer {
    text-align: center;
    color: #aaa;
    font-size: 12px;
    margin-top: 10px;
    padding: 15px;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.popup {
    width: 300px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    text-align: center;
    position: relative;
}

.popup h2 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.proxy-features {
    margin: 15px 0;
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.proxy-features p {
    margin: 10px 0;
}

.thank-you {
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
    color: #666;
    font-size: 14px;
}

.popup-button {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.3s;
}

.popup-button:hover {
    opacity: 0.8;
}

.toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 280px;
    text-align: center;
    animation: toast-show 0.3s ease-out;
}

.toast-message {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

@keyframes toast-show {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .card {
        background: #1e1e1e;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .info-text {
        color: #aaa;
    }
    
    .log-container {
        background: #2d2d2d;
        color: #d0d0d0;
    }
    
    textarea.result-text {
        background: #252525;
        border: 1px solid #444;
        color: #e0e0e0;
    }
    
    .proxy-toggle {
        background: #007bff;
        border: 1px solid #007bff;
    }
    
    .toggle-label {
        color: #a0c0ff;
    }
    
    .popup {
        background-color: rgba(30, 30, 30, 0.9);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
        color: #e0e0e0;
    }
    
    .popup h2 {
        color: #e0e0e0;
    }
    
    .proxy-features {
        color: #d0d0d0;
    }
    
    .thank-you {
        color: #aaa;
    }
    
    .toast {
        background: #2d2d2d;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .toast-message {
        color: #e0e0e0;
    }
    
    .toast-overlay {
        background: rgba(0, 0, 0, 0.5);
    }
}
