/* Common styles for all screens in the Discord-like app */

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #FFFFFF;
    background-color: #36393F; /* Discord main background color */
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* iPhone 15 Pro dimensions */
.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Status Bar Styling - iOS style */
.status-bar {
    position: relative;
    height: 44px;
    width: 100%;
    background-color: #36393F; /* Match app background */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 12px;
    z-index: 100;
}

.status-bar-left {
    display: flex;
    align-items: center;
}

.status-bar-time {
    font-weight: 600;
}

.status-bar-right {
    display: flex;
    align-items: center;
}

.status-bar-icon {
    margin-left: 5px;
}

/* Dynamic island for iPhone 15 Pro */
.dynamic-island {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 126px;
    height: 34px;
    background-color: #000;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

/* Main content area */
.content {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Discord color palette */
:root {
    --brand-color: #5865F2;
    --brand-color-dark: #4752C4;
    --accent-color: #7289DA;
    --success-color: #43B581;
    --danger-color: #F04747;
    --warning-color: #FAA61A;
    --background-primary: #36393F;
    --background-secondary: #2F3136;
    --background-tertiary: #202225;
    --text-normal: #FFFFFF;
    --text-muted: #B9BBBE;
    --text-link: #00AFF4;
    --interactive-normal: #B9BBBE;
    --interactive-hover: #DCDDDE;
    --interactive-active: #FFFFFF;
    --status-online: #43B581;
    --status-idle: #FAA61A;
    --status-dnd: #F04747;
    --status-offline: #747F8D;
}

/* Common UI components */

/* Navigation */
.nav-bar {
    display: flex;
    background-color: var(--background-secondary);
    padding: 10px 16px;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
}

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

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

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

/* Input fields */
.input {
    background-color: var(--background-tertiary);
    border: none;
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--text-normal);
    font-size: 14px;
    width: 100%;
}

.input::placeholder {
    color: var(--text-muted);
}

/* Icon button */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    color: var(--interactive-normal);
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--interactive-hover);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-tertiary);
    overflow: hidden;
    position: relative;
}

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

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--background-primary);
}

.status-online {
    background-color: var(--status-online);
}

.status-idle {
    background-color: var(--status-idle);
}

.status-dnd {
    background-color: var(--status-dnd);
}

.status-offline {
    background-color: var(--status-offline);
}

/* Server icon */
.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--background-tertiary);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 500;
    transition: border-radius 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.server-icon.active {
    border-radius: 16px;
}

.server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-icon.add {
    background-color: var(--background-tertiary);
    color: var(--success-color);
    font-size: 24px;
}

/* Channel styles */
.channel {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    margin: 2px 0;
}

.channel.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-normal);
}

.channel-icon {
    margin-right: 6px;
    color: inherit;
}

.channel:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--interactive-hover);
}

/* Message styles */
.message {
    padding: 10px 16px;
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.message-content {
    margin-left: 12px;
    flex: 1;
}

.message-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 4px;
}

.message-author {
    font-weight: 500;
    margin-right: 8px;
}

.message-time {
    font-size: 12px;
    color: var(--text-muted);
}

.message-text {
    color: var(--text-normal);
    word-break: break-word;
}