:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-color);
    background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.screen {
    display: none;
    flex: 1;
    flex-direction: column;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.screen.active {
    display: flex;
}

/* Glassmorphism utility */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

/* Unlock Screen */
#unlock-screen {
    justify-content: center;
    align-items: center;
}

.unlock-card {
    width: 100%;
    max-width: 350px;
    text-align: center;
}

.unlock-card h1 {
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.unlock-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

input[type="password"],
input[type="tel"],
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-main);
    padding: 16px;
    font-size: 1.1rem;
    margin-bottom: 16px;
    outline: none;
    transition: all 0.2s ease;
}

input:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

textarea {
    resize: vertical;
    font-size: 1rem;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
}

.primary-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

.error-msg, .status-msg {
    margin-top: 12px;
    font-size: 0.85rem;
    min-height: 20px;
}
.error-msg { color: var(--danger-color); }
.status-msg.success { color: var(--success-color); }
.status-msg.error { color: var(--danger-color); }

/* App Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 8px;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255,255,255,0.1);
}

.status.ready { background: rgba(16, 185, 129, 0.2); color: var(--success-color); }
.status.calling { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status.connected { background: rgba(59, 130, 246, 0.2); color: var(--primary-color); }
.status.error { background: rgba(239, 68, 68, 0.2); color: var(--danger-color); }

/* Target Section */
#phone-input {
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 0;
}

/* Dialer Controls */
.dialer-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#call-timer {
    font-size: 2.5rem;
    font-variant-numeric: tabular-nums;
    font-weight: 300;
    margin-bottom: 24px;
    color: var(--text-main);
    opacity: 0.8;
}

.action-buttons {
    display: flex;
    gap: 16px;
    width: 100%;
}

.action-btn {
    flex: 1;
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 16px;
}

.call-btn {
    background: var(--success-color);
    color: white;
}

.call-btn:hover:not(:disabled) { background: #059669; }

.hangup-btn {
    background: var(--danger-color);
    color: white;
}

.hangup-btn:hover:not(:disabled) { background: var(--danger-hover); }

/* SMS Section */
.sms-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

/* Log Section */
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.text-btn {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 4px 8px;
}
.text-btn:hover { color: var(--text-main); }

#history-log {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
}

#history-log li {
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
#history-log li:last-child { border-bottom: none; }

.log-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-number { font-weight: 600; }
.log-type { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }
.log-time { font-size: 0.8rem; color: var(--text-muted); }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }
