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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.header h1 {
    color: #333;
    font-size: 28px;
}

.user-info {
    color: #666;
    font-size: 14px;
}

.user-info a {
    color: #667eea;
    text-decoration: none;
}

.user-info a:hover {
    text-decoration: underline;
}

.status-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 15px;
}

.status {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

.status.offline {
    background: #ff4757;
    color: white;
}

.status.online {
    background: #2ed573;
    color: white;
}

.status.idle {
    background: #ffa502;
    color: white;
}

.status.calling, .status.ringing {
    background: #1e90ff;
    color: white;
    animation: pulse 2s infinite;
}

.status.answered {
    background: #2ed573;
    color: white;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.dialer-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.display {
    margin-bottom: 25px;
}

#dial-number {
    width: 100%;
    padding: 18px;
    font-size: 28px;
    text-align: center;
    border: 3px solid #dee2e6;
    border-radius: 12px;
    outline: none;
    background: white;
    transition: all 0.3s;
    font-weight: 600;
}

#dial-number:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.key {
    padding: 25px 10px;
    font-size: 28px;
    font-weight: 600;
    border: none;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.key:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.key:active {
    transform: translateY(-1px);
}

.controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.btn {
    padding: 15px 10px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn.call {
    background: linear-gradient(135deg, #2ed573, #20bf6b);
    grid-column: span 2;
}

.btn.hangup {
    background: linear-gradient(135deg, #ff4757, #eb3b5a);
}

.btn.answer {
    background: linear-gradient(135deg, #1e90ff, #3742fa);
}

.btn.reject {
    background: linear-gradient(135deg, #ffa502, #fa8231);
}

.btn.mute {
    background: linear-gradient(135deg, #747d8c, #57606f);
}

.btn.hold {
    background: linear-gradient(135deg, #a4b0be, #7b8a9e);
}

.btn.record {
    background: linear-gradient(135deg, #ff6b81, #ff4757);
}

.audio-container {
    display: none;
}

.call-history {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #eee;
}

.call-history h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

#call-list {
    max-height: 300px;
    overflow-y: auto;
}

.call-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.call-item:hover {
    background: #f8f9fa;
}

.call-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.call-number {
    font-weight: 600;
    color: #333;
}

.call-details {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.call-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-answered {
    background: #d1fae5;
    color: #065f46;
}

.status-missed {
    background: #fef3c7;
    color: #92400e;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.call-time {
    color: #999;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .key {
        padding: 20px 5px;
        font-size: 24px;
    }
    
    .btn {
        padding: 12px 5px;
        font-size: 14px;
    }
    
    .controls {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn.call {
        grid-column: span 1;
    }
}

/* Scrollbar styling */
#call-list::-webkit-scrollbar {
    width: 8px;
}

#call-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#call-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

#call-list::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}