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

/* Start Screen */
.start-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: transparent;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.start-screen.active {
    display: flex;
}

.start-content {
    text-align: center;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.phone-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: ring 1s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

.start-content h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.start-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.start-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.start-button:active {
    transform: translateY(0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Phone Container */
.phone-container {
    width: 100%;
    max-width: 375px;
    height: 667px;
    background: #000;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    border: 8px solid #1a1a1a;
}

.screen {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px 30px 40px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
}

.screen.active {
    display: flex;
}

/* Caller Info */
.caller-info {
    text-align: center;
    margin-top: 40px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.caller-name {
    color: white;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 600;
}

.call-status {
    color: #888;
    font-size: 18px;
}

/* Call Actions */
.call-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 0;
}

.action-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn:active {
    transform: scale(0.95);
}

.decline {
    background: #ff3b30;
}

.answer {
    background: #34c759;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(52, 199, 89, 0.4);
    }
    50% {
        box-shadow: 0 5px 30px rgba(52, 199, 89, 0.8);
    }
}

/* Active Call Screen */
.conversation {
    flex: 1;
    overflow-y: auto;
    margin: 20px 0;
}

.transcript {
    color: white;
    font-size: 16px;
    line-height: 1.6;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background: #667eea;
    margin-left: auto;
    text-align: right;
}

.ai-message {
    background: #2a2a2a;
    margin-right: auto;
}

.listening {
    background: #ff9500;
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 14px;
    display: inline-block;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Call Controls */
.call-controls {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #2a2a2a;
    border: none;
    border-radius: 15px;
    padding: 15px 20px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 80px;
}

.control-btn:hover {
    background: #3a3a3a;
}

.control-btn span {
    margin-top: 8px;
    font-size: 12px;
}

.end-call {
    background: #ff3b30;
}

.end-call:hover {
    background: #ff2d1f;
}

.control-btn.muted {
    background: #ff9500;
}

/* Admin Container */
.admin-container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-container h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.admin-section {
    margin-bottom: 25px;
}

.admin-section label {
    display: block;
    color: #555;
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-section input,
.admin-section select,
.admin-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.admin-section input:focus,
.admin-section select:focus,
.admin-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.toggle-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.toggle-btn:hover {
    background: #5568d3;
}

.model-info {
    margin-top: 8px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}

.admin-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.save-btn,
.test-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.save-btn {
    background: #34c759;
    color: white;
}

.save-btn:hover {
    background: #2fb350;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 199, 89, 0.3);
}

.test-btn {
    background: #667eea;
    color: white;
}

.test-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.back-link {
    display: block;
    text-align: center;
    color: #667eea;
    text-decoration: none;
    margin-top: 15px;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.info-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-section h3 {
    color: #333;
    margin-bottom: 15px;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    color: #666;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.info-section li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

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

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

.free-badge {
    background: #34c759;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Model dropdown styling */
#model-select option.free-model {
    background: #d4edda;
    font-weight: 600;
}

/* Scrollbar styling */
.conversation::-webkit-scrollbar {
    width: 6px;
}

.conversation::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.conversation::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.conversation::-webkit-scrollbar-thumb:hover {
    background: #555;
}
