/* Terra Firma PWA - Mobile-First Styles */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    padding: 16px;
}

.container {
    max-width: 400px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #4ecdc4;
}

.actor-badge {
    display: inline-block;
    background: #4ecdc4;
    color: #1a1a2e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 8px;
}

.card {
    background: #16213e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 12px;
}

.hint {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

textarea, input {
    width: 100%;
    background: #0f0f23;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    color: #eee;
    font-family: monospace;
    font-size: 12px;
    resize: none;
    margin-bottom: 12px;
}

textarea:focus, input:focus {
    outline: none;
    border-color: #4ecdc4;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn.primary {
    background: #4ecdc4;
    color: #1a1a2e;
}

.btn.primary:hover {
    background: #3dbdb5;
}

.btn.primary:active {
    transform: scale(0.98);
}

.btn.primary:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.btn.secondary {
    background: transparent;
    border: 1px solid #4ecdc4;
    color: #4ecdc4;
}

.btn.text {
    background: transparent;
    color: #666;
    font-size: 14px;
    margin-top: 20px;
}

.btn.large {
    padding: 20px;
    font-size: 18px;
}

.btn .icon {
    margin-right: 8px;
}

.status {
    text-align: center;
    padding: 12px;
    font-size: 14px;
    min-height: 40px;
}

.status.success {
    color: #4ecdc4;
}

.status.error {
    color: #ff6b6b;
}

.status.pending {
    color: #ffd93d;
}

.error {
    color: #ff6b6b;
    font-size: 14px;
    padding: 8px;
    text-align: center;
}

.state-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #222;
}

.state-row:last-of-type {
    border-bottom: none;
}

.state-row .label {
    color: #666;
    font-size: 14px;
}

.state-row .value {
    color: #eee;
    font-size: 14px;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    font-size: 12px;
    color: #666;
}

.status-bar .connected {
    color: #4ecdc4;
}

.status-bar .disconnected {
    color: #ff6b6b;
}

.hidden {
    display: none !important;
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #1a1a2e;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
