:root {
    --twitter-blue: #1DA1F2;
    --twitter-gray: #657786;
    --border-color: #E1E8ED;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.theme-white {
    background-color: #fff;
    color: #000;
    --border-color: #E1E8ED;
}

.theme-dim {
    background-color: #15202B;
    color: #D9D9D9;
    --border-color: #38444D;
}

.theme-lights-out {
    background-color: #000;
    color: #FFF;
    --border-color: #1C2526;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
    background-color: #F5F8FA;
}

.theme-dim .search-container,
.theme-lights-out .search-container {
    background-color: #2F3B47;
}

#filterButton {
    border: none;
    padding: 12px 16px;
    background: transparent;
    font-size: 16px;
    color: var(--twitter-blue);
}

/* Style specifically for disabled buttons */
button:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed; /* Shows a "no entry" sign on hover */
  opacity: 0.6;
}

#filterButton:hover {
    background-color: rgba(29, 161, 242, 0.1);
}

#searchBar {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 16px;
    background: transparent;
    outline: none;
}

.filter-panel {
    max-width: 600px;
    margin: 10px auto;
    padding: 10px;
    background-color: #F5F8FA;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-dim .filter-panel,
.theme-lights-out .filter-panel {
    background-color: #2F3B47;
}

.filter-panel label {
    font-size: 14px;
    color: var(--twitter-gray);
}

.filter-panel select {
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 5px;
    font-size: 14px;
    background: transparent;
    color: inherit;
}

.theme-selector {
    margin: 10px 0;
}

.timeline {
    max-width: 600px;
    margin: 0 auto;
}

.tweet {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.tweet:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.theme-dim .tweet:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.theme-lights-out .tweet:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

.tweet img.profile-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 10px;
}

.tweet-content {
    flex: 1;
}

.tweet-header {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
}

.tweet-header .name {
    font-weight: 700;
}

.tweet-header .screen-name,
.tweet-header .timestamp {
    color: var(--twitter-gray);
    font-weight: 400;
}

.tweet-text {
    font-size: 15px;
    line-height: 20px;
    margin: 4px 0;
    white-space: pre-wrap;
}

.tweet-text strong {
    font-weight: 700;
}

.tweet-media img,
.tweet-media video {
    max-width: 100%;
    border-radius: 16px;
    margin-top: 8px;
}

.reply-info a {
    color: var(--twitter-blue);
    text-decoration: none;
}

.reply-info a:hover {
    text-decoration: underline;
}

.tweet-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: var(--twitter-gray);
    max-width: 425px;
}

.action {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.action:hover {
    color: var(--twitter-blue);
}

.view-on-twitter {
    margin-top: 8px;
    font-size: 13px;
}

.view-on-twitter a {
    color: var(--twitter-blue);
    text-decoration: none;
}

.view-on-twitter a:hover {
    text-decoration: underline;
}

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

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    text-align: center;
}

.theme-dim .modal-content {
    background-color: #15202B;
    color: #D9D9D9;
}

.theme-lights-out .modal-content {
    background-color: #000;
    color: #FFF;
}

.modal-content button {
    background-color: var(--twitter-blue);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 16px;
}

.modal-content button:hover {
    background-color: #1A91DA;
}

#loading {
    color: var(--twitter-blue);
    font-size: 16px;
}