:root {
    --primary-color: #0096d6;    /* Telegram blue */
    --secondary-color: #131415;
    --background-color: #000000; /* Pure black iOS background */
    --text-color: #ffffff;
    --card-bg: #141414;          /* Slightly lighter than background */
    --hover-color: #0084bd;
    --error-color: #ff3b30;      /* iOS red */
    --success-color: #34c759;    /* iOS green */
    --border-color: rgba(255, 255, 255, 0.08);
    --dim-text: #8a8a8a;         /* Subtle gray for secondary text */
    --bubble-sent: #0f7dbe;      /* Sent message bubble */
    --bubble-received: #1C1C1D;  /* Received message bubble */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Auth Section */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Input Styles */
input {
    padding: 15px;
    border: none;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.2s;
}

input:focus {
    background-color: rgba(255, 255, 255, 0.06);
    outline: none;
}

button {
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 16px;
}

button:hover {
    background-color: var(--hover-color);
}

button:active {
    transform: scale(0.98);
}

/* Chat Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-container {
    max-width: 100%;
    margin: 0 auto;
    height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
}

.messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 15px;
    border-radius: 18px;
    background-color: var(--bubble-received);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-bubble.self {
    align-self: flex-end;
    background-color: var(--bubble-sent);
    border-top-right-radius: 4px;
}

.message-bubble:not(.self) {
    border-top-left-radius: 4px;
}

.message-bubble.mentioned {
    border-left: 3px solid var(--primary-color);
}

.message-sender {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.message-content-wrapper {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
}

.message-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 5px;
    align-self: flex-end;
}

.edit-indicator {
    font-size: 12px;
    color: var(--dim-text);
    margin-top: 2px;
}

.message-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.message-bubble:hover .message-actions {
    opacity: 1;
}

.edit-btn, .report-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 12px;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
}

.edit-btn:hover, .report-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.fa-pen-to-square, .fa-flag {
    font-size: 14px;
}

.date-separator {
    text-align: center;
    margin: 20px 0;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--dim-text);
    font-size: 12px;
    font-weight: 500;
    align-self: center;
}

.input-container {
    display: flex;
    gap: 10px;
    padding: 12px 15px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.input-container input {
    flex-grow: 1;
    border-radius: 20px;
    padding: 12px 15px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 14px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: scaleIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
    }
    to {
        transform: scale(1);
    }
}

/* Admin Dashboard */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.admin-actions {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ban-user-section,
.premium-requests,
.reported-messages {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Description Card styles */
.description-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 14px;
    margin: 20px;
    text-align: left;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.description-card h3 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.description-card p {
    margin: 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dim-text);
    font-size: 15px;
}

.description-card p::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
}

.description-card p.version::before {
    content: "\f126";  /* code-branch icon */
}

.description-card p.update::before {
    content: "\f017";  /* clock icon */
}

.description-card p.about::before {
    content: "\f05a";  /* info icon */
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 15px;
    border-radius: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.social-links a:hover {
    transform: translateY(-2px);
}

.social-links a:active {
    transform: scale(0.98);
}

.social-links a.telegram {
    background-color: #0088cc;
}

.social-links a.whatsapp {
    background-color: #25D366;
}

.social-links a.support {
    background-color: #7289da;
}

.social-links a i {
    font-size: 20px;
}

.social-links a span {
    flex: 1;
}

.social-links a::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    opacity: 0.7;
}

/* Alert System */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.alert::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
}

.alert-success {
    background-color: var(--success-color);
}

.alert-success::before {
    content: "\f00c";
}

.alert-error {
    background-color: var(--error-color);
}

.alert-error::before {
    content: "\f00d";
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 120px);
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .description-card {
        padding: 20px;
    }
    
    .social-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px;
    }
    
    .input-container {
        padding: 10px;
    }
    
    .message-bubble {
        max-width: 90%;
    }
}
