* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    max-width: 100%;
}

body.chat-open {
    overflow: hidden;
}

.profile-header-wrapper {
    max-width: 1000px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.back-btn {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.profile-header-name {
    flex: 1;
    text-align: left;
    margin: 0;
}

.profile-header-name h1 {
    color: white;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin: 0;
}

.profile-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.profile-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-image-container {
    text-align: center;
}

.profile-image-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

.profile-info-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.info-label {
    font-size: 0.85em;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.2em;
    color: #333;
    font-weight: bold;
}

.btn-message {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.gallery-section {
    display: flex;
    flex-direction: column;
}

.gallery-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Chat Icon */
.chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 999;
}

.chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.chat-icon.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header-wrapper {
        margin: 0 10px 20px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .profile-header-name {
        text-align: left;
        width: 100%;
    }
    
    .profile-detail {
        grid-template-columns: 1fr;
    }
    
    .profile-image-container img {
        max-width: 100%;
    }
    
    .profile-container {
        margin: 0 10px;
        padding: 20px;
    }
    
    .profile-info-boxes {
        grid-template-columns: 1fr;
    }
    
    .profile-header-name h1 {
        font-size: 2em;
    }
}

