/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #ff69b4 100%);
    min-height: 100vh;
    color: #333;
}

/* Header */
.header {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    color: #ff6b6b;
    font-size: 1.8rem;
}

.tokens {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.tokens i {
    color: #ffd93d;
}

/* Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.nav-btn.active {
    color: #00b4db;
}

.nav-btn i {
    font-size: 1.2rem;
}

.nav-btn span {
    font-size: 0.8rem;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    margin-bottom: 80px;
    padding: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 25px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    outline: none;
}

.search-bar button {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Filters */
.filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    border-color: #00b4db;
}

/* Profiles Grid */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.profile-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.profile-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-status {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 15px;
    height: 15px;
    background: #4caf50;
    border-radius: 50%;
    border: 3px solid white;
}

.online-status.offline {
    background: #999;
}

.profile-info {
    padding: 1.5rem;
}

.profile-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.2rem;
}

.profile-info p {
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-info .bio {
    color: #888;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Profile Detail */
.profile-detail {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
}

.profile-header {
    position: relative;
    height: 400px;
}

.profile-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-actions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 0.5rem;
}

.message-btn {
    flex: 1;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.gift-btn {
    flex: 1;
    background: linear-gradient(135deg, #ffd93d 0%, #ff9f43 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.gift-btn:hover {
    transform: scale(1.05);
}

.profile-details {
    padding: 2rem;
}

.profile-details h2 {
    margin-bottom: 0.5rem;
    color: #333;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    color: #333;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Messages */
.conversations {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s ease;
}

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

.conversation-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.conversation-info {
    flex: 1;
}

.conversation-info h4 {
    margin-bottom: 0.25rem;
    color: #333;
}

.conversation-info p {
    color: #666;
    font-size: 0.9rem;
}

.conversation-info .time {
    color: #999;
    font-size: 0.8rem;
}

.unread-badge {
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Chat */
#chat-screen {
    display: none;
}

#chat-screen.active {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 80px;
    background: white;
    z-index: 1500;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-info {
    flex: 1;
}

.chat-info h4 {
    margin-bottom: 0.25rem;
}

.online-indicator {
    font-size: 0.8rem;
    opacity: 0.8;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.call-btn, .video-call-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.call-btn:hover, .video-call-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.call-btn i, .video-call-btn i {
    font-size: 1.1rem;
}

.chat-messages {
    background: white;
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    position: relative;
}

.message.received {
    background: #f0f0f0;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.sent {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message .time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    display: block;
}

.message .cost {
    font-size: 0.7rem;
    color: #ff6b6b;
    margin-top: 0.25rem;
    display: block;
}

.gift-message {
    background: linear-gradient(135deg, #ffd93d 0%, #ff9f43 100%) !important;
    border: 2px solid #ffb347;
}

.gift-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.gift-emoji-large {
    font-size: 2rem;
}

.gift-content p {
    margin: 0;
    font-weight: bold;
    text-align: center;
}

.chat-input {
    background: white;
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
}

.chat-gift-btn {
    background: linear-gradient(135deg, #ffd93d 0%, #ff9f43 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

.send-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.token-cost {
    font-size: 0.8rem;
}

/* Recharge */
.recharge-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.recharge-content h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #333;
}

.recharge-content > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.recharge-option {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.recharge-option:hover {
    border-color: #00b4db;
    transform: translateY(-2px);
}

.recharge-option.popular {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
}

.recharge-option .badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b6b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.recharge-option .tokens {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.recharge-option .price {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.recharge-btn {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.recharge-btn:hover {
    transform: scale(1.05);
}

.sms-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
}

.sms-info h3 {
    margin-bottom: 1rem;
    color: #333;
}

.sms-info ol {
    color: #666;
    line-height: 1.6;
}

.sms-info li {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .profiles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .recharge-options {
        grid-template-columns: 1fr;
    }
}

/* Animation 3D Container */
.gift-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-animation-canvas {
    width: 100%;
    height: 100%;
}

.gift-animation-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10000;
    pointer-events: none;
}

.gift-animation-text {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.gift-animation-emoji {
    font-size: 4rem;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (max-width: 480px) {
    .profiles-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        padding: 0 0.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .tokens {
        font-size: 0.9rem;
    }
    
    .gift-animation-text {
        font-size: 1.5rem;
    }
    
    .gift-animation-emoji {
        font-size: 3rem;
    }
}
