:root {
    --primary: #000000;
    --primary-hover: #333333;
    --bg-light: #ffffff;
    --bg-secondary: #f9f9f9;
    --border-color: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #000000;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 550px;
    z-index: 10;
}

.main-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    text-align: center;
}

.header {
    margin-bottom: 32px;
    text-align: left;
}

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

.logo {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.logo svg {
    width: 20px;
    height: 20px;
}

.brand-name {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.05em;
    margin-bottom: 8px;
}

.header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 80%;
}

.input-section {
    text-align: left;
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.input-wrapper span {
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 8px;
}

input[type="number"] {
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
}

input::placeholder {
    color: #9ca3af;
}

.kill-button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 100px;
    /* Capsule shape */
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.kill-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.kill-button:active {
    transform: translateY(0);
}

.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading .loader {
    display: block;
}

.status-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    display: none;
    text-align: left;
}

.status-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
}

.status-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.ports-section {
    margin-top: 40px;
    text-align: left;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--text-main);
    padding-bottom: 8px;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.toggle-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.toggle-item input {
    cursor: pointer;
}

.icon-button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.icon-button i {
    width: 16px;
    height: 16px;
    display: block;
}

.icon-button:hover {
    background: var(--bg-secondary);
    border-color: var(--text-main);
}

.ports-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.port-item {
    padding: 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.port-item:hover {
    border-color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.port-badge {
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
}

.process-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.unsafe-badge {
    font-size: 0.65rem;
    background: #000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.port-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-path {
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.memory-usage {
    font-weight: 600;
    color: var(--text-main);
}

.port-unsafe {
    opacity: 0.8;
}

.loading-spinner,
.no-ports {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}