:root {
    --bg: #ffffff;
    --text: #111;
    --muted: #6b7280;
    --blue: #2563eb;
    --green: #22c55e;
    --line: #e5e7eb;
    --surface: #f9fafb;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Roboto, system-ui, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.android-dialer {
    width: 360px;
    height: 760px;
    background: var(--bg);
    border-radius: 38px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* Header */
.dial-header {
    text-align: center;
    padding: 20px 0 10px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.dial-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* Keypad */
.keys {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 40px 50px;
    justify-items: center;
}

.keys button {
    width: 70px;
    height: 70px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.keys button:active {
    background: rgba(0, 0, 0, 0.08);
}

.keys small {
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
    padding: 0 40px;
}

/* Centered call button */
.call-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--green);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

/* Clear button bottom-right */
.clear-btn {
    position: absolute;
    right: 50px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 28px;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.clear-btn:active {
    color: var(--text);
    background: rgba(0, 0, 0, 0.08);
}

.call-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--green);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* Recents */
.recents-list {
    padding: 10px 16px;
    flex: 1;
    overflow-y: auto;
    background: var(--bg);
}

.log-entry {
    background: var(--surface);
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--line);
}

.log-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-call {
    color: var(--blue);
    font-size: 18px;
}

.icon-missed {
    color: #dc2626;
    font-size: 18px;
}

.log-text {
    display: flex;
    flex-direction: column;
}

.log-name {
    font-size: 15px;
    color: var(--text);
}

.log-time {
    font-size: 12px;
    color: var(--muted);
}

.log-right {
    color: var(--muted);
    font-size: 13px;
}

/* Bottom nav */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--line);
    padding: 8px 0;
    background: var(--surface);
}

.tab {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.tab span {
    font-size: 20px;
    margin-bottom: 2px;
}

.tab.active {
    color: var(--blue);
    font-weight: 600;
}

/* Active Call Screen */
.dark-call {
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    padding: 40px 0;
}

.call-top h4 {
    font-size: 14px;
    color: #bbb;
    margin: 0;
}

.call-top h2 {
    margin: 6px 0 2px;
    font-size: 22px;
    font-weight: 600;
}

.call-top p {
    margin: 0;
    color: #aaa;
    font-size: 14px;
}

#callTimer {
    font-size: 26px;
    font-weight: 500;
    margin-top: 12px;
    color: #fff;
}

.call-actions-panel {
    background: #111;
    border-radius: 24px 24px 0 0;
    padding: 30px 20px 40px;
    width: 90%;
    margin: 0 auto;
}

.call-actions-panel .row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 28px;
}

.call-action {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1f1f1f;
    border: none;
    color: #fff;
    font-size: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.call-action span {
    font-size: 12px;
    color: #ccc;
    margin-top: 5px;
}

.call-action:active {
    background: #333;
}

.call-action.active {
    background: #2563eb;
    color: #fff;
}

.end-area {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.end-call {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #ef4444;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.dial-input {
    width: 100%;
    border: none;
    outline: none;
    text-align: center;
    font-size: 28px;
    font-weight: 500;
    padding: 16px 0;
    background: var(--bg);
    color: var(--text);
}

.dial-input:focus {
    outline: none;
}