/* style.css for ApeX */

:root {
    --primary-bg: #f0f2f5;
    --secondary-bg: #ffffff;
    --post-bg: #fff;
    --header-bg: #3b5998;
    --text-color: #1c1e21;
    --link-color: #1877f2;
    --border-color: #dddfe2;
    --banana-color: #ffcc00;
    --code-bg: #e4e6eb; /* Light code background */
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-bg: #18191a;
    --secondary-bg: #242526;
    --post-bg: #242526;
    --header-bg: #363a3d;
    --text-color: #e4e6eb;
    --link-color: #72b1ff;
    --border-color: #3e4042;
    --banana-color: #ffcc00;
    --code-bg: #2d2d2d; /* Dark code background */
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

header, main, #topic-submission-area, .post, .post-header .ape-type {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--header-bg);
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

header h1 {
    margin: 0;
    font-size: 2.0rem;
}

header p {
    margin: 0;
    margin-left: 15px;
}

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

header nav a, header h1 a{
    color: white;
    text-decoration: none;
    font-weight: bold;
}

header h1 a:hover {
    text-decoration: underline;
}

#dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

main {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

#topic-submission-area {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

h2 {
    border-bottom: 2px solid var(--header-bg);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--text-color);
}

textarea {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
    min-height: 100px;
    margin-bottom: 10px;
background-color: var(--secondary-bg);
                    color: var(--text-color);
}

button {
    background-color: var(--header-bg);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#topic-form button:hover {
    background-color: #365492;
}

#loading-indicator {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--header-bg);
    margin: 10px auto;
    animation: spin 1s ease infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#timeline {
    margin-top: 20px;
}

.post {
    
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 20px; margin-bottom: 5px;
    background-color: var(--post-bg);
}

.post-reply {
    margin-left: 30px; /* Indent replies */
    border-left: 5px solid #e4e6eb; /* Visual cue for replies */
    padding-left: 10px; /* Adjust padding due to border */
    margin-top: 5px; /* Reduce space between replies */
    margin-bottom: 5px;
}

.post-icon { 
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}



.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.post-header .ape-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.post-header .ape-type {
    font-size: 0.9rem;
    
    margin-left: 10px;
    
    padding: 2px 6px;
    border-radius: 4px;
}

.post-body {
    margin: 20px;
    }

.post-footer {
    display: flex; gap: 20px;
    align-items: center;
    color: #65676b;
    font-size: 0.9rem;
}

.banana-count {
    margin-right: 20px;
}
.banana-count span {
    color: var(--banana-color);
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: #65676b;
}

