/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Avenir Next', 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #f8f8f8;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Button Styles */
.btn-primary {
    background-color: #fffc00;
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #e6e300;
}

.btn-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
}

/* Login & Signup Styles */
.login-container, .signup-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
}

.signup-container {
    display: none;
}

.logo {
    margin-bottom: 20px;
}

.logo img {
    width: 60px;
    height: 60px;
}

.logo h1 {
    font-size: 24px;
    margin-top: 10px;
    color: #000;
}

.form-container h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.input-group {
    margin-bottom: 15px;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #fffc00;
    outline: none;
}

.input-group label {
    position: absolute;
    top: -8px;
    left: 15px;
    background-color: white;
    padding: 0 5px;
    font-size: 12px;
    color: #666;
}

.form-footer {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.form-footer a {
    color: #0088cc;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Main App Styles */
.main-app {
    display: none;
    width: 100%;
    height: 100vh;
    background-color: white;
}

.sidebar {
    width: 250px;
    height: 100%;
    background-color: #f1f1f1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
}

.profile-section {
    padding: 0 20px 20px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 2px solid #fffc00;
}

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

.profile-section h3 {
    font-size: 16px;
    color: #333;
}

.menu {
    flex: 1;
    padding: 20px 0;
}

.menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background-color: #e0e0e0;
}

.menu-item.active {
    background-color: #fffc00;
    color: #000;
}

.menu-item i {
    margin-right: 10px;
    font-size: 18px;
}

.logout {
    padding: 0 20px 20px;
}

.logout button {
    width: 100%;
    padding: 12px;
    background-color: #f1f1f1;
    border: none;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout button:hover {
    background-color: #e0e0e0;
}

.logout button i {
    margin-right: 10px;
}

.content {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
}

/* Screen Styles */
.screen {
    height: 100%;
}

.screen.hidden {
    display: none;
}

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

.screen-header h2 {
    font-size: 20px;
    color: #333;
}

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

.search-bar input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Friends List Styles */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.friend-item:hover {
    background-color: #f1f1f1;
}

.friend-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.friend-status {
    font-size: 12px;
    color: #666;
}

/* Chat List Styles */
.chat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.chat-item:hover {
    background-color: #f1f1f1;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.chat-preview {
    font-size: 12px;
    color: #666;
}

.chat-time {
    font-size: 12px;
    color: #999;
}

/* Stories Styles */
.stories-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.my-story {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.story-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    margin-bottom: 5px;
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-story {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background-color: #fffc00;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
}

.add-story i {
    font-size: 10px;
    color: #000;
}

.stories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.story-item .story-avatar {
    border: 2px solid #fffc00;
}

.story-username {
    font-size: 12px;
    color: #333;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Discover Styles */
.discover-section {
    margin-bottom: 30px;
}

.discover-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

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

.discover-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.discover-thumbnail {
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.discover-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discover-info {
    padding: 10px;
    background-color: white;
}

.discover-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.discover-publisher {
    font-size: 12px;
    color: #666;
}

/* Settings Styles */
.settings-list {
    display: flex;
    flex-direction: column;
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.settings-item:hover {
    background-color: #f9f9f9;
}

.settings-item i:first-child {
    margin-right: 15px;
    font-size: 18px;
    color: #666;
    width: 20px;
    text-align: center;
}

.settings-item span {
    flex: 1;
    font-size: 16px;
    color: #333;
}

.settings-item i:last-child {
    color: #999;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .main-app {
        display: flex;
    }
}

@media (max-width: 767px) {
    .main-app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px 0;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .profile-section {
        display: none;
    }

    .menu {
        display: flex;
        padding: 0;
    }

    .menu-item {
        flex: 1;
        padding: 10px 5px;
        flex-direction: column;
        text-align: center;
    }

    .menu-item i {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .logout {
        display: none;
    }

    .content {
        height: calc(100% - 70px);
    }
}

/* Animation Styles */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Utility Classes */
.hidden {
    display: none;
}