/* ArkHub -- minimal stylesheet */

:root {
	--bg: #0e0e10;
	--fg: #e0e0e0;
	--accent: #7c6fe0;
	--accent-dim: #5a50b0;
	--surface: #1a1a1e;
	--border: #2a2a30;
	--mono: "SF Mono", "Cascadia Code", "Fira Code", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: var(--bg);
	color: var(--fg);
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Nav */
header { border-bottom: 1px solid var(--border); }

nav {
	width: 960px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
	display: flex;
	align-items: center;
	gap: 2rem;
}

nav a {
	color: var(--fg);
	text-decoration: none;
}

nav a:hover { color: var(--accent); }

.nav-spacer { flex: 1; }

.logo {
	font-weight: 700;
	font-size: 1.1rem;
	letter-spacing: -0.02em;
}

/* Main */
main {
	width: 960px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
	flex: 1;
}

/* Footer */
footer {
	border-top: 1px solid var(--border);
	text-align: center;
	padding: 1.5rem;
	font-size: 0.85rem;
	color: #666;
}

/* Links */
a { color: #b0a8f0; }
a:hover { color: var(--accent); }
a:visited { color: #9990d0; }

/* Typography */
h1 { font-size: 2rem; margin-bottom: 0.75rem; letter-spacing: -0.03em; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; color: var(--accent); }
p { margin-bottom: 1rem; }

/* Lists */
ol, ul { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }

/* Code */
code {
	font-family: var(--mono);
	background: var(--surface);
	padding: 0.15em 0.4em;
	border-radius: 3px;
	font-size: 0.9em;
}

/* Hero */
.hero {
	padding: 2rem 0 1rem;
}

.hero h1 {
	font-size: 2.5rem;
}

/* Info cards */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 1.25rem;
	margin-bottom: 1rem;
}

.card h3 {
	font-size: 0.9rem;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.5rem;
}

.card .value {
	font-family: var(--mono);
	font-size: 1.1rem;
}

/* Status */
.status-running { color: #4ade80; }
.status-stopped { color: #f87171; }
.status-standby { color: #facc15; }

/* Tables */
table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

th, td {
	text-align: left;
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid var(--border);
}

th {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #888;
}

/* Buttons */
.btn {
	display: inline-block;
	padding: 0.6rem 1.2rem;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.95rem;
	cursor: pointer;
	text-decoration: none;
}

.btn:hover { background: var(--accent-dim); }

/* Forms */
form { margin: 1rem 0; }

label {
	display: block;
	font-size: 0.85rem;
	color: #888;
	margin-bottom: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
	width: 100%;
	padding: 0.5rem 0.75rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 4px;
	color: var(--fg);
	font-size: 0.95rem;
	margin-bottom: 1rem;
}

input:focus {
	outline: none;
	border-color: var(--accent);
}

/* Nav user */
.nav-user {
	color: #888;
	font-size: 0.9rem;
}

/* Dashboard header */
.dashboard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 2rem;
}

.dashboard-header h1 {
	margin-bottom: 0;
}

/* Server table */
.server-table {
	width: 100%;
	border-collapse: collapse;
}

.server-table th {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #666;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--border);
}

.server-row td {
	padding: 0.75rem;
	border-bottom: none;
}

.projects-row td {
	padding: 0.25rem 0.75rem 0.75rem 2rem;
	border-bottom: 1px solid var(--border);
	font-size: 0.85rem;
	color: #888;
}

/* Disk bar */
.disk-bar {
	display: inline-block;
	width: 80px;
	height: 12px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 3px;
	overflow: hidden;
	vertical-align: middle;
}

.disk-bar-fill {
	height: 100%;
	background: var(--accent);
	border-radius: 2px;
	transition: width 0.3s ease;
}

.disk-bar-provisioning {
	width: 100% !important;
	background: repeating-linear-gradient(
		-45deg,
		var(--accent-dim),
		var(--accent-dim) 8px,
		var(--surface) 8px,
		var(--surface) 16px
	);
	background-size: 200% 100%;
	animation: barberpole 1.5s linear infinite;
}

@keyframes barberpole {
	0% { background-position: 0 0; }
	100% { background-position: 32px 0; }
}

/* Status provisioning */
.status-provisioning {
	color: #facc15;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* DNS subtitle */
.dns-waiting {
	font-size: 0.75rem;
	color: #facc15;
	margin-top: 2px;
}
.dns-reachable {
	font-size: 0.75rem;
	color: #4ade80;
	margin-top: 2px;
}

/* Empty state */
.empty-state {
	text-align: center;
	padding: 2rem 1rem;
	color: #888;
	font-style: italic;
}

/* Modal */
.modal-overlay {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 100;
	align-items: center;
	justify-content: center;
}

.modal-overlay.active {
	display: flex;
}

.modal {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 1.5rem;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.modal-header h2 {
	margin: 0;
	font-size: 1.2rem;
	color: var(--fg);
}

.modal-close {
	background: none;
	border: none;
	color: #888;
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0 0.25rem;
	line-height: 1;
}

.modal-close:hover { color: var(--fg); }

.modal-actions {
	margin-top: 1rem;
	text-align: right;
}

/* Name input row */
.name-input-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.name-input-row input {
	flex: 1;
	margin-bottom: 0;
}

.name-available {
	color: #4ade80;
	font-size: 0.85rem;
	white-space: nowrap;
}

.name-taken {
	color: #f87171;
	font-size: 0.85rem;
	white-space: nowrap;
}

/* Tier options */
.tier-options {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.tier-option {
	display: block;
	cursor: pointer;
	margin-bottom: 0;
}

.tier-option input[type="radio"] {
	display: none;
}

.tier-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 1rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 4px;
	transition: border-color 0.15s;
}

.tier-option input:checked + .tier-card {
	border-color: var(--accent);
}

.tier-card strong {
	min-width: 60px;
}

.tier-specs {
	flex: 1;
	font-size: 0.85rem;
	color: #888;
}

.tier-price {
	font-family: var(--mono);
	font-size: 0.9rem;
	color: var(--accent);
}

/* Copy button */
.btn-copy {
	display: inline-block;
	margin-left: 0.5rem;
	padding: 0.2rem;
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	vertical-align: middle;
	line-height: 1;
}

.btn-copy:hover {
	color: var(--accent);
}

.btn-copy svg {
	width: 14px;
	height: 14px;
	vertical-align: middle;
}

/* Disabled button */
.btn-disabled, .btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Loading state */
.loading { color: #888; font-style: italic; }
.status-unreachable { color: #888; }

/* Error / message */
.error {
	background: #2d1215;
	border: 1px solid #5c2228;
	color: #f87171;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.success {
	background: #0d2818;
	border: 1px solid #1a5c2e;
	color: #4ade80;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}
