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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.title {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1rem;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#urlInput {
    flex: 1;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

#urlInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.go-btn {
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.go-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.go-btn:active {
    transform: translateY(0);
}

.settings-btn {
    padding: 12px 30px;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: #667eea;
    color: white;
}

.settings-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.settings-panel.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
}

.settings-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.settings-content h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 30px;
    text-align: center;
}

.settings-section {
    margin-bottom: 35px;
}

.settings-section h3 {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.section-note {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 12px;
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    border-radius: 4px;
}

.troubleshooting-note {
    background: linear-gradient(135deg, #fef5e7 0%, #fdebd0 100%);
    border: 2px solid #f39c12;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 25px;
    color: #7d5a0e;
    font-size: 0.95rem;
    line-height: 1.6;
}

.troubleshooting-note strong {
    color: #e67e22;
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.setting-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: #edf2f7;
}

.setting-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
}

.setting-item input[type="checkbox"],
.setting-item input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.setting-description {
    color: #718096;
    font-size: 0.85rem;
    margin-top: 8px;
    margin-left: 32px;
}

.close-settings-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.close-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

footer {
    margin-top: 40px;
    text-align: center;
    color: white;
    font-size: 0.9rem;
}

footer a {
    color: white;
}

.wisp-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 280px;
    max-height: 400px;
    overflow: hidden;
    z-index: 999;
}

.wisp-status-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.wisp-server-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
}

.wisp-scanning {
    text-align: center;
    padding: 20px;
    color: #718096;
    font-size: 0.9rem;
}

.wisp-server-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.wisp-server-item:hover {
    background: #edf2f7;
    cursor: pointer;
}

.wisp-server-item.active {
    background: #e6fffa;
    border: 2px solid #38b2ac;
}

.wisp-server-url {
    color: #2d3748;
    font-weight: 500;
    font-size: 0.8rem;
    word-break: break-all;
    flex: 1;
}

.wisp-server-status {
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.wisp-server-status.online {
    background: #c6f6d5;
    color: #22543d;
}

.wisp-server-status.offline {
    background: #fed7d7;
    color: #742a2a;
}

.wisp-server-status.testing {
    background: #feebc8;
    color: #7c2d12;
}

.cloak-custom {
    background: #edf2f7;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
}

@media (max-width: 768px) {
    .wisp-status {
        bottom: 10px;
        right: 10px;
        width: 240px;
        max-height: 300px;
    }
    
    .wisp-server-list {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 40px 25px;
    }

    .title {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
    }

    .go-btn {
        width: 100%;
    }

    .settings-content {
        padding: 30px 20px;
    }

    .settings-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    #urlInput {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .settings-content {
        padding: 25px 15px;
    }
}