* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}
*:focus,
*:focus-visible {
    outline: none!important;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none!important;
}

body {
    background-color: #f0f2f5;
    font-size: clamp(0.75rem, 3vw, 0.8rem);
    overflow-x: hidden;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.7);
    padding: clamp(0.6rem, 2vw, 0.8rem) clamp(0.6rem, 3vw, 1rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 2rem);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 100;
}
.logo {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: bold;
    color: #ff4b4b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


#rightButtons {
    display: flex;
    align-items: center;
}
#userButtons {
    display: flex;
}
.login-btn, .user-btn {
    background-color: #ff4b4b;
    color: white;
    padding: clamp(0.2rem, 1vw, 0.25rem) clamp(0.4rem, 2vw, 0.8rem);
    border: none;
    border-radius: 1.25rem;
    cursor: pointer;
    font-size: clamp(0.5rem, 3vw, 0.9rem);
    min-width: clamp(3.2rem, 8vw, 3.4rem);
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}
.login-btn {
    background-color: #ff4b4b;
}
.user-btn {
    background-color: #ccc;
    margin-right: clamp(3px, 2vw, 15px);
}
.user-btn i {
    margin-right: clamp(1px, 0.5vw, 3px);
    font-size: clamp(0.8rem, 2.5vw, 0.85rem);
}
.login-btn:hover {
    background-color: #ff2d2d;
}
.user-btn:hover {
    background-color: #ccbbcc;
}

.user-avatar {
    width: clamp(1.55rem, 5vw, 2rem);
    height: clamp(1.55rem, 5vw, 2rem);
    border-radius: 50%;
    background-color: #ff4b4b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}
.user-avatar:hover {
    background-color: #ff2d2d;
}

.user-avatar-container {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    min-width: 70px;
    z-index: 1000;
    display: none;
    transform-origin: top right;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    border-radius: 0.2rem;
}
.dropdown-menu.active {
    display: block;
    transform: scale(1);
    opacity: 1;
}
.dropdown-item {
    width: 100%;
    padding: 5px 8px;
    font-size: 12px;
    color: #6b7280;
    transition: background-color 0.15s ease;
    border: none;
    background: none;
    margin: 0;
    border-radius: 0.2rem;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    color: #4b5563;
}

.header {
    background:
        url("../../header.jpg") no-repeat center,
        linear-gradient(135deg, #ff4b4b, #ff904d),
        #ff4b4b;
    background-size: cover;
    color: white;
    padding: clamp(3.4rem, 10vw, 4.5rem) clamp(0.5rem, 3vw, 1rem) clamp(1rem, 3vw, 1.5rem);
    text-align: center;
    margin-bottom: clamp(1rem, 3vw, 0);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    margin-bottom: clamp(0.2rem, 1vw, 0.3rem);
    letter-spacing: 0.02em;
}

.header p {
    font-size: clamp(0.9rem, 3vw, 1rem);
    color: #f8f8f8;
}

.view-announcement-btn {
    position: absolute;
    margin-top: 1vw;	
    transform: translateY(-50%);
    border: none;
    color: #333;
    font-size: clamp(0.65rem, 1.5vw, 0.9rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.3s ease;
    padding: clamp(0.1rem, 0.6vw, 0.3rem) clamp(0.5rem, 2vw, 1rem);
    border-radius: 1.5rem;
    background: rgba(240, 240, 240, 0.4);
}

.view-announcement-btn:hover {
    color: #007bff;
}

.platform-selector {
    overflow-x: auto;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.platform-buttons {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    padding: 0 0.5rem;
    min-width: max-content;
    justify-content: center;
}
.platform-btn {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    border-radius: 1.25rem;
    padding: 0.35rem 1.05rem;
    font-size: clamp(0.8rem, 3vw, 0.95rem);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.platform-btn.active {
    background-color: white;
    color: #ff4b4b;
    font-weight: 600;
}
.platform-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.task-container {
    max-width: 100%;
    margin: 0 auto;
    min-height: calc(100vh - 13.75rem);
    padding: 0.5rem clamp(0.5rem, 3vw, 1rem) 2rem;
    background-color: #f1f3f5;
}


.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f1f3f5;
    margin-bottom: 0.4rem;
}
.search-label {
    margin-right: clamp(0.2rem, 0.5vw, 0.3rem);
    color: #4b5563;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 500;
    white-space: nowrap;
    min-width: 3.3rem;
}
.search-input {
    border: 1px solid #d1d5db;
    border-radius: 0.475rem;
    padding: clamp(0.2rem, 0.8vw, 0.3rem) clamp(0.5rem, 1vw, 0.55rem);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    line-height: 1.25rem;
    width: clamp(9rem, 50vw, 25rem);
    height: clamp(2rem, 3vh, 2.5rem);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.search-input::placeholder {
    font-size: clamp(0.75rem, 1.8vw, 0.8rem);
    color: #9ca3af;
    opacity: 1;
}
.search-confirm-btn,
.search-clear-btn {
    margin-left: clamp(0.3rem, 0.8vw, 0.5rem);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    padding: clamp(0.25rem, 0.8vw, 0.4rem) clamp(0.8rem, 2vw, 1.2rem);
    width: clamp(3.8rem, 5vw, 4.5rem);
    height: clamp(2rem, 3vh, 2.5rem);
}
.search-confirm-btn {
    background-color: #6366f1;
    color: white;
    border-radius: 0.375rem;
}
.search-confirm-btn:hover {
    background-color: #4f46e5;
}
.search-clear-btn {
    background-color: #e5e7eb;
    color: #4b5563;
    border-radius: 0.375rem;
}
.search-clear-btn:hover {
    background-color: #d1d5db;
}


.loading {
    text-align: center;
    padding: clamp(0.5rem, 3vw, 1rem) 0;
}

.task-card {
    background: white;
    border-radius: clamp(8px, 3vw, 10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: clamp(0.5rem, 3vw, 1rem);
    overflow: hidden;
    transition: all 0.3s ease;
}
.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.5rem, 3vw, 1rem);
}
.task-title {
    font-size: clamp(1.05rem, 4vw, 1.2rem);
    font-weight: 600;
    margin-bottom: clamp(0.3rem, 1vw, 0.4rem);
}
.task-meta {
    font-size: clamp(0.85rem, 2vw, 1rem);
}
.task-content {
    padding: clamp(0.5rem, 3vw, 1rem);
    line-height: 1.5;
    color: #555;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
}
.task-actions {
    display: flex;
    justify-content: flex-end;
    padding: clamp(0.2rem, 3vw, 0.5rem);
    border-top: 1px solid #f0f0f0;
}
.claim-btn {
    background-color: #ff4b4b;
    color: white;
    padding: clamp(0.3rem, 2vw, 0.5rem) clamp(0.6rem, 4vw, 1.2rem);
    border: none;
    border-radius: 1.2rem;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: clamp(4rem, 20vw, 5rem);
    white-space: nowrap;
    outline: none;
    box-shadow: none;
}
.claim-btn--loading {
    background-color: #ff6b6b;
}
.claim-btn:hover {
    background-color: #ff2d2d;
}





.no-tasks {
    text-align: center;
    padding: 4.5rem 1.25rem;
    color: #999999;
    font-size: 1rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}
.no-tasks i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}
.modal-content {
    background-color: white;
    border-radius: 0.625rem;
    width: 100%;
    max-width: 25rem;
    padding: 1.5rem;
    position: relative;
}
.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}
.close-modal:hover {
    color: #ff4b4b;
}

#login-submit:disabled,
#register-submit:disabled {
    background-color: #ff8a8a;
    opacity: 0.8;
    cursor: not-allowed;
}

#login-submit:not(:disabled):hover,
#register-submit:not(:disabled):hover {
    background-color: #ff2d2d;
}

#login-component {
    display: block;
}

.title-area {
    text-align: center;
    margin-bottom: 1.2rem;
}
.title-area h2 {
    font-size: 1.55rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}
.title-area p {
    color: #6b7280;
    font-size: 0.875rem;
}
.plus-icon {
    display: inline-block;
    transform: rotate(-6deg);
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-right: 0.5rem;
}

#captcha-image {
    border: 1px solid #ddd;
    border-radius: 0.25rem;
}

.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: #555;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
}
.form-group input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #ddd;
    border-radius: 0.3rem;
    font-size: clamp(0.85rem, 3vw, 1rem);
    transition: border-color 0.2s;
}
.form-group input:focus {
    outline: none;
    border-color: #ff4b4b;
}

.submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #ff4b4b;
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
.submit-btn:hover {
    background-color: #ff2d2d;
}

#send-verification-code.submit-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    width: auto;
    flex-shrink: 0;
    background-color: #4299e1;
}
#send-verification-code.submit-btn:hover {
    background-color: #3182ce;
}
#send-verification-code.submit-btn:disabled {
    background-color: #a0bfe0;
    cursor: not-allowed;
}

.toggle-text {
    text-align: center;
    margin-top: 1rem;
}
.toggle-text a {
    color: #ff4b4b;
    text-decoration: none;
}
.toggle-text a:hover {
    color: #ff2d2d;
    text-decoration: underline;
}

.password-container {
    position: relative;
    display: inline-block;
    width: 100%;
}
.password-toggle {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    font-size: 1rem;
}
.password-toggle:hover {
    color: #333;
}
.password-toggle,
.password-toggle:focus,
.password-toggle:focus-visible {
    outline: none!important;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none!important;
    pointer-events: auto;
    user-select: none;
}

.footer {
    background-color: #f8f9fa;
    border-top: 0.125rem solid #dee2e6;
    box-shadow: 0 -0.0625rem 0 #f8f9fa;
    padding: 0.5rem 0;
    overflow: visible;
}
.tag-container {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 clamp(0.25rem, 1vw, 0.5rem);
    overflow: visible;
}
.tag-row {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(0.375rem, 1vw, 0.625rem);
    margin-bottom: clamp(0.375rem, 1vw, 0.625rem);
    overflow: visible;
    width: 100%;
    white-space: nowrap;
}
.big-tag {
    display: inline-block;
    padding: clamp(0.1875rem, 0.8vw, 0.25rem) clamp(0.375rem, 1.5vw, 0.5rem);
    background-color: #e6f7ff;
    color: #1890ff;
    border-radius: clamp(0.875rem, 2vw, 1rem);
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 600;
    white-space: nowrap;
}
.small-tag {
    display: inline-block;
    padding: clamp(0.125rem, 0.6vw, 0.1875rem) clamp(0.25rem, 1vw, 0.375rem);
    background-color: #f0f2f5;
    color: #4e5969;
    border-radius: clamp(0.75rem, 2vw, 0.875rem);
    font-size: clamp(0.625rem, 1.2vw, 0.7rem);
    white-space: nowrap;
}
.copyright {
    margin-top: clamp(0.375rem, 1vw, 0.625rem);
    font-size: clamp(0.7rem, 1.2vw, 0.75rem);
    text-align: center;
    color: #6c757d;
    white-space: nowrap;
}
.disclaimer {
    font-size: clamp(0.625rem, 1vw, 0.7rem);
    color: #868e96;
    margin-top: clamp(0.375rem, 0.8vw, 0.5rem);
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 0 clamp(0.25rem, 1vw, 0.5rem);
    white-space: nowrap;
}

.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.announcement-modal.active {
    opacity: 1;
    visibility: visible;
}

.announcement-content {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-height: 65vh;
    display: flex;
    flex-direction: column;
}

.announcement-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.announcement-title {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

.close-announcement {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    padding: 0 0.5rem;
}

.close-announcement:hover {
    color: #333;
}

.announcement-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.announcement-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.announcement-image {
    width: 70%;
    height: auto;
    border-radius: 0.25rem;
    margin: 1rem 0;
    display: block;
}

.announcement-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.announcement-link:hover {
    text-decoration: underline;
}

.announcement-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    text-align: right;
    background-color: #f8f9fa;
}

.announcement-confirm {
    padding: 0.5rem 1.2rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.announcement-confirm:hover {
    background-color: #0056b3;
}

.announcement-meta {
    padding: 0 1.5rem 0;
    font-size: 0.85rem;
    color: #888;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 768px) {
   .announcement-header {
        padding: 1rem;
   }

   .announcement-title {
        font-size: 1.1rem;
   }

   .announcement-body {
        padding: 1rem;
   }

   .announcement-footer {
        padding: 0.8rem 1rem;
   }
   .announcement-meta {
       padding: 0 0.8rem 0;
       flex-direction: column;
       gap: 0.3rem;
   }
}


.claimed-info {
    color: #666;
    padding: clamp(0.375rem, 0.5vw, 0.5rem) clamp(0.75rem, 1vw, 1rem);
    background-color: #f5f5f5;
    border-radius: 0.25rem;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
}
.hidden {
    display: none !important;
}