/**
 * Custom CSS Overrides
 * 
 * This file contains styles to override WordPress default styles
 * and ensure our theme styles take precedence.
 * 
 * Reference: https://developer.wordpress.org/themes/basics/css/
 */

html, body,
html *, body * {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
    background: #1a1a2e;
}

body,
body.custom-background,
body.wp-custom-logo,
body.wp-embed-responsive,
body.post-type-archive,
body.single-post,
body.page,
body.home,
body.blog,
body.archive,
body.search,
body.error404 {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

a,
a:link,
a:visited,
a:hover,
a:active {
    color: #f5c518;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 1rem;
}

ul, ol {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

li {
    color: rgba(255, 255, 255, 0.85);
}

table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

th {
    background: rgba(245, 197, 24, 0.1);
    color: #f5c518;
}

input, textarea, select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.75rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #f5c518;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    background: linear-gradient(135deg, #f5c518 0%, #d4a80a 100%);
    color: #1a1a2e;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 197, 24, 0.3);
}

.wp-block-group,
.wp-block-columns,
.wp-block-image,
.wp-block-heading,
.wp-block-paragraph,
.wp-block-list,
.wp-block-quote,
.wp-block-separator,
.wp-block-button,
.wp-block-cover,
.wp-block-gallery,
.wp-block-table,
.wp-block-audio,
.wp-block-video,
.wp-block-calendar,
.wp-block-categories,
.wp-block-tag-cloud,
.wp-block-archives,
.wp-block-rss,
.wp-block-search,
.wp-block-text-columns,
.wp-block-pullquote {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.single-content .site-main {
    background: transparent;
}

.single-content .article-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.site-content,
.home-content,
.single-content {
    padding-top: 70px;
    background: transparent;
}

.single-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.widget {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.widget-title {
    color: #f5c518;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(245, 197, 24, 0.2);
}

.widget ul,
.widget ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    margin-bottom: 0.5rem;
}

.widget a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #f5c518;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author .avatar {
    border-radius: 50%;
    margin-right: 0.75rem;
}

.comment-author cite {
    font-style: normal;
    font-weight: 600;
    color: #ffffff;
}

.comment-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.comment-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(245, 197, 24, 0.15);
    color: #f5c518;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.comment-reply-link:hover {
    background: rgba(245, 197, 24, 0.25);
    color: #f5c518;
}

.comment-form {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ffffff;
    margin-bottom: 1rem;
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #f5c518;
}

.comment-form input[type="submit"] {
    background: linear-gradient(135deg, #f5c518 0%, #d4a80a 100%);
    color: #1a1a2e;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 197, 24, 0.3);
}

.gallery {
    margin: 1.5rem 0;
}

.gallery-item {
    margin: 0;
}

.gallery-caption {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.pagination {
    margin: 2rem 0;
}

.pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: rgba(245, 197, 24, 0.15);
    border-color: #f5c518;
    color: #f5c518;
}

.pagination .current {
    background: rgba(245, 197, 24, 0.25);
    border-color: #f5c518;
    color: #f5c518;
}

.search-results .page-header {
    margin-bottom: 2rem;
}

.search-results .page-title {
    color: #ffffff;
    font-size: 1.8rem;
}

.error404 .page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.error404 .page-title {
    font-size: 3rem;
    color: #f5c518;
    margin-bottom: 1rem;
}

.error404 .page-content {
    text-align: center;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.wp-block-table th,
.wp-block-table td {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.wp-block-table th {
    background: rgba(245, 197, 24, 0.1);
    color: #f5c518;
    font-weight: 600;
}

.wp-block-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.wp-block-button .wp-block-button__link {
    background: linear-gradient(135deg, #f5c518 0%, #d4a80a 100%);
    color: #1a1a2e;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wp-block-button .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 197, 24, 0.3);
}

.wp-block-quote {
    border-left: 4px solid #f5c518;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.wp-block-pullquote {
    border-top: 4px solid #f5c518;
    border-bottom: 4px solid #f5c518;
    padding: 1.5rem 0;
    margin: 2rem 0;
    text-align: center;
}

.wp-block-pullquote p {
    font-size: 1.25rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.wp-block-separator {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 197, 24, 0.5), transparent);
    margin: 2rem 0;
}

.wp-block-columns {
    gap: 1.5rem;
}

.wp-block-cover {
    position: relative;
    overflow: hidden;
}

.wp-block-cover .wp-block-cover__inner-container {
    position: relative;
    z-index: 1;
}

.wp-block-navigation {
    background: transparent;
}

.wp-block-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-block-navigation li {
    display: inline-block;
    margin-right: 1rem;
}

.wp-block-navigation a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wp-block-navigation a:hover {
    color: #f5c518;
}

.site-branding {
    margin: 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f5c518;
    margin: 0;
}

.site-title a {
    color: #f5c518;
    text-decoration: none;
}

.site-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

.site-footer .widget {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
}

.site-footer .widget-title {
    color: #f5c518;
}

.site-footer .widget a {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer .widget a:hover {
    color: #f5c518;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.bypostauthor {
    background: rgba(245, 197, 24, 0.05);
    padding: 1rem;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .wp-block-columns {
        flex-direction: column;
    }
    
    .pagination ul {
        flex-wrap: wrap;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}