/* Global Styles */
:root {
    --primary-color: #ff7e5f;
    --primary-dark: #e56e50;
    --secondary-color: #6a5acd;
    --light-gray: #f5f5f5;
    --medium-gray: #e1e1e1;
    --dark-gray: #333;
    --white: #fff;
    --black: #000;
    --online: #4caf50;
    --away: #ff9800;
    --offline: #9e9e9e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

a {
    text-decoration: none;
    color: inherit;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 12px 24px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--dark-gray);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* Header Styles */
.hero-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 20px 5%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
    font-size: 28px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.hero-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* Features Section */
.features-section {
    padding: 80px 5%;
    text-align: center;
}

.features-section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--dark-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: 80px 5%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.about-content {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.about-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 50px 5% 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-logo i {
    margin-right: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #ccc;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--white);
    font-size: 20px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 0.9rem;
}

/* App Container Styles */
.app-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--white);
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background-color: var(--white);
    border-right: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.new-chat-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    margin-top: 15px;
}

.new-chat-btn:hover {
    background-color: var(--primary-dark);
}

.new-chat-btn i {
    margin-right: 8px;
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    outline: none;
}

.search-bar i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.chat-list {
    flex-grow: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.chat-item:hover {
    background-color: var(--light-gray);
}

.chat-item.active {
    background-color: #ffece8;
}

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

.chat-info {
    flex-grow: 1;
    overflow: hidden;
}

.chat-name {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.last-message {
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.time {
    font-size: 0.8rem;
    color: #999;
    white-space: nowrap;
}

.badge {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    position: absolute;
    right: 12px;
    top: 12px;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--medium-gray);
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-grow: 1;
}

.user-profile:hover {
    background-color: var(--light-gray);
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.user-profile span {
    font-weight: 500;
}

.friends-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    transition: all 0.3s;
}

.friends-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Chat Area Styles */
.chat-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--medium-gray);
    background-color: var(--white);
    z-index: 10;
}

.chat-partner {
    display: flex;
    align-items: center;
}

.chat-partner img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.partner-info {
    display: flex;
    flex-direction: column;
}

.partner-info .name {
    font-weight: 600;
}

.partner-info .status {
    font-size: 0.8rem;
    color: #666;
}

.chat-actions button {
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    margin-left: 15px;
    cursor: pointer;
    transition: color 0.3s;
}

.chat-actions button:hover {
    color: var(--primary-color);
}

/* Messages Container */
.messages-container {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.message-date {
    text-align: center;
    margin: 20px 0;
}

.message-date span {
    background-color: var(--medium-gray);
    color: #666;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.message {
    display: flex;
    margin-bottom: 15px;
    max-width: 70%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.message.received .message-content {
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    border-bottom-left-radius: 4px;
}

.message.sent .message-content {
    background-color: var(--primary-color);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.sender {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    display: block;
}

.message.sent .sender {
    text-align: right;
}

.time {
    font-size: 10px;
    color: #999;
    display: block;
    margin-top: 4px;
    text-align: right;
}

.message.sent .time {
    color: rgba(255, 255, 255, 0.8);
}

/* Message Input */
.message-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--medium-gray);
    align-items: center;
    background-color: var(--white);
}

.message-input input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    margin: 0 10px;
}

.message-input button {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.message-input button:hover {
    color: var(--primary-color);
}

.send-btn {
    color: var(--primary-color) !important;
    font-size: 20px !important;
}

/* Profile Page Styles */
.profile-page .profile-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

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

.profile-header h1 {
    font-size: 2rem;
}

.profile-card {
    display: flex;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.profile-image {
    position: relative;
    min-width: 300px;
}

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

.upload-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.profile-info {
    padding: 30px;
    flex-grow: 1;
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.breed {
    color: #666;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.status.online {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--online);
}

.status.away {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--away);
}

.status.offline {
    background-color: rgba(158, 158, 158, 0.1);
    color: var(--offline);
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.detail {
    background-color: var(--light-gray);
    padding: 12px;
    border-radius: 8px;
}

.detail .label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.detail .value {
    font-weight: 500;
}

.bio {
    margin-bottom: 30px;
}

.bio h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.bio p {
    line-height: 1.6;
    color: #555;
}

.interests h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: var(--light-gray);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.profile-gallery h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Friends Page Styles */
.friends-page .friends-content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

.friends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.friends-header h1 {
    font-size: 2rem;
}

.search-friends {
    position: relative;
    min-width: 250px;
}

.search-friends input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    outline: none;
}

.search-friends i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.friends-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.friends-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.friend-card {
    display: flex;
    align-items: center;
    background-color: var(--white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.friend-card:hover {
    transform: translateY(-5px);
}

.friend-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.friend-info {
    flex-grow: 1;
}

.friend-info h3 {
    margin-bottom: 5px;
}

.friend-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.friend-actions {
    display: flex;
    gap: 5px;
}

.find-friends h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.suggestion-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    text-align: center;
    padding-bottom: 15px;
    transition: transform 0.3s;
}

.suggestion-card:hover {
    transform: translateY(-5px);
}

.suggestion-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
}

.suggestion-card h3 {
    margin-bottom: 5px;
    padding: 0 10px;
}

.suggestion-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    padding: 0 10px;
}

.suggestion-card .mutual {
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-bottom: 15px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--medium-gray);
    }
    
    .profile-card {
        flex-direction: column;
    }
    
    .profile-image {
        min-width: 100%;
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .about-section {
        flex-direction: column;
    }
    
    .about-content {
        padding-right: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .friends-list {
        grid-template-columns: 1fr;
    }
    
    .suggestions-grid {
        grid-template-columns: 1fr 1fr;
    }
}