/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
    min-height: 100vh;
}

/* Header Navigation - Same as index.html */
.header {
    background: #F8FAFC;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.header-container {
    max-width: 1920px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo Section */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon-box {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    font-family: 'Inter', sans-serif;
}

.logo-text {
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #111827;
}

/* Navigation Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Earn Free Credits Button */
.btn-earn-credits {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2563EB;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-earn-credits:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-earn-credits:active {
    transform: translateY(0);
}

.btn-earn-credits svg {
    color: white;
    stroke-width: 1.5;
}

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(37, 99, 235, 0.15);
    color: #111827;
}

.nav-link svg {
    color: #6B7280;
}

.nav-link:hover svg {
    color: #111827;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    padding-right: 8px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1F2937;
    border-radius: 10px;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* More Dropdown Items - 只针对导航栏的More下拉菜单 */
.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #D1D5DB;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-menu .dropdown-item:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #FFFFFF;
}

.dropdown-menu .dropdown-item svg {
    width: 16px;
    height: 16px;
    color: #9CA3AF;
    flex-shrink: 0;
}

.dropdown-menu .dropdown-item:hover svg {
    color: #FFFFFF;
}

/* Icon Buttons - Round Style */
.icon-btn-round {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1.5px solid #E5E7EB;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
    margin-left: 6px;
}

.icon-btn-round:hover {
    background: #F9FAFB;
    border-color: #2563EB;
    color: #2563EB;
    transform: translateY(-1px);
}

.icon-btn-round svg {
    display: block;
}

/* Call Container */
.call-container {
    width: 100%;
    max-width: 440px;
    margin: 40px auto;
    padding: 0 20px;
}

.call-card {
    background: rgba(219, 234, 254, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 32px 28px;
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.12);
}

/* Header */
.call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(251, 191, 36, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
}

.balance-text {
    font-size: 14px;
    font-weight: 600;
    color: #92400E;
}

.balance-add-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #92400E;
    padding: 0;
}

.balance-add-btn:hover {
    opacity: 0.7;
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: #2563EB;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Test Call Notice */
.test-call-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #2563EB;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
}

.audio-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
}

.audio-control-btn:hover {
    background: #F9FAFB;
    border-color: #2563EB;
    transform: translateY(-2px);
}

.audio-control-btn:active {
    transform: translateY(0);
}

.audio-control-btn.active {
    background: #2563EB;
    border-color: #2563EB;
    color: white;
}

.audio-control-btn.active svg {
    stroke: white;
}

.audio-control-btn svg {
    stroke: #6B7280;
}

.audio-control-btn.active svg {
    stroke: white;
}

.audio-control-btn span {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
}

.audio-control-btn.active span {
    color: white;
}

/* Phone Input Section */
.phone-input-section {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.7);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 16px;
}

/* 国家选择器容器 */
.country-selector-container {
    display: inline-block;
    min-width: 80px;
}

.country-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.country-selector:hover {
    background: rgba(0, 0, 0, 0.05);
}

.flag {
    font-size: 20px;
}

.country-code {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.phone-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #111827;
    outline: none;
}

.phone-input::placeholder {
    color: #9CA3AF;
}

.clear-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.clear-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Call From Section */
.call-from-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}

.call-from-label {
    font-size: 14px;
    color: #6B7280;
}

.public-number-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(30, 64, 175, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #2563EB;
    cursor: pointer;
    transition: all 0.2s;
}

.public-number-selector:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #2563EB;
}

.public-number-selector svg {
    color: #2563EB;
}

.selected-number-flag {
    font-size: 18px;
    line-height: 1;
    margin-right: -2px;
}

/* Number Options Dropdown */
.number-options-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1F2937;
    border-radius: 12px;
    padding: 8px;
    min-width: 280px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.number-options-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-header {
    font-size: 11px;
    text-transform: uppercase;
    color: #9CA3AF;
    padding: 8px 12px;
    letter-spacing: 0.5px;
}

.number-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.number-option:last-child {
    margin-bottom: 0;
}

.number-option:hover {
    background: rgba(16, 185, 129, 0.1);
}

.number-option svg {
    flex-shrink: 0;
}

.option-label {
    flex: 1;
    font-size: 14px;
    color: #F9FAFB;
    font-weight: 500;
}

.option-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.option-badge.free {
    background: #10B981;
    color: white;
}

.option-badge.price {
    background: #10B981;
    color: white;
}

.option-badge.active {
    background: #10B981;
    color: white;
}

.my-numbers-section-dropdown {
    margin-bottom: 8px;
}

/* Add Contact Button */
.add-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: 1.5px solid #2563EB;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #2563EB;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.add-contact-btn:hover {
    background: rgba(37, 99, 235, 0.1);
}

.add-contact-btn svg {
    color: #2563EB;
}

/* Dial Pad */
.dial-pad {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.dial-btn {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.dial-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

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

.dial-btn .number {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    line-height: 1;
}

.dial-btn .letters {
    font-size: 10px;
    font-weight: 500;
    color: #6B7280;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Action Row */
.action-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
}

.action-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.5);
    color: #6B7280;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

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

.btn-text {
    font-size: 16px;
    font-weight: 600;
    color: #6B7280;
}

.call-btn {
    background: #2563EB;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.call-btn:hover {
    background: #1D4ED8;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

/* Responsive */
@media (max-width: 480px) {
    .call-card {
        padding: 24px 20px;
    }

    .dial-btn .number {
        font-size: 22px;
    }

    .dial-btn .letters {
        font-size: 9px;
    }
}

/* Buy Number Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 480px;
    background: #2D3748;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
    max-height: 80vh;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.modal-title-section {
    flex: 1;
    padding-right: 12px;
}

.modal-title {
    font-size: 15px;
    font-weight: 400;
    color: #E5E7EB;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.modal-subtitle {
    font-size: 13px;
    color: #9CA3AF;
    line-height: 1.5;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-search {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.modal-country-btn {
    height: 40px;
    padding: 0 12px;
    background: #374151;
    border: 1px solid #4B5563;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-country-btn:hover {
    background: #4B5563;
}

.modal-area-input {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    background: #374151;
    border: 1px solid #4B5563;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.modal-area-input:focus {
    outline: none;
    border-color: #10B981;
}

.modal-area-input::placeholder {
    color: #6B7280;
}

.modal-search-btn {
    height: 40px;
    padding: 0 20px;
    background: #10B981;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-search-btn:hover {
    background: #059669;
}

.modal-numbers-section {
    /* No border needed in modal */
}

.modal-numbers-title {
    font-size: 14px;
    font-weight: 500;
    color: #E5E7EB;
    margin: 0 0 12px 0;
}

.modal-numbers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

/* Custom scrollbar for modal numbers list */
.modal-numbers-list::-webkit-scrollbar {
    width: 6px;
}

.modal-numbers-list::-webkit-scrollbar-track {
    background: #2D3748;
    border-radius: 3px;
}

.modal-numbers-list::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 3px;
}

.modal-numbers-list::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

.modal-number-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #374151;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-number-item:hover {
    background: #4B5563;
}

.modal-number-info {
    flex: 1;
}

.modal-number-phone {
    font-size: 15px;
    font-weight: 500;
    color: white;
    margin: 0 0 4px 0;
}

.modal-number-price {
    font-size: 12px;
    color: #9CA3AF;
    margin: 0;
}

.modal-buy-btn {
    height: 32px;
    padding: 0 16px;
    background: #10B981;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-buy-btn:hover {
    background: #059669;
}

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

@media (max-width: 640px) {
    .modal-search {
        flex-direction: column;
    }

    .modal-search-btn {
        width: 100%;
    }
}

/* Modal Country Selector Overrides */
#modalCountrySelectorContainer .country-selector-wrapper {
    position: relative;
    flex-shrink: 0;
}

#modalCountrySelectorContainer .country-selector-button {
    height: 40px;
    padding: 0 12px;
    background: #374151 !important;
    border: 1px solid #4B5563 !important;
    border-radius: 8px;
    color: white !important;
    font-size: 14px;
}

#modalCountrySelectorContainer .country-selector-button:hover {
    background: #4B5563 !important;
}

#modalCountrySelectorContainer .country-selector-dropdown {
    background: #374151;
    border: 1px solid #4B5563;
    margin-top: 4px;
}

#modalCountrySelectorContainer .country-search-input {
    background: #2D3748;
    border: 1px solid #4B5563;
    color: white;
}

#modalCountrySelectorContainer .country-search-input::placeholder {
    color: #6B7280;
}

#modalCountrySelectorContainer .country-option {
    color: white;
}

#modalCountrySelectorContainer .country-option:hover {
    background: #4B5563;
}

#modalCountrySelectorContainer .country-option.selected {
    background: #10B981;
    color: white;
}

#modalCountrySelectorContainer .country-name,
#modalCountrySelectorContainer .country-dialing-code {
    color: #E5E7EB;
}

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #F3F4F6;
    color: #374151;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #E5E7EB;
    background: white;
    color: #111827;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
    color: #9CA3AF;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
}

.modal-actions button {
    padding: 11px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background: white;
    border: 1.5px solid #E5E7EB;
    color: #374151;
}

.btn-cancel:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.btn-primary {
    background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}


/* Notification Toast */
.notification-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    color: #111827;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border-left: 4px solid #2563EB;
}

.notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast.success {
    border-left-color: #10B981;
}

.notification-toast.error {
    border-left-color: #DC2626;
}

.notification-toast.info {
    border-left-color: #3B82F6;
}
