/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.navbar {
    background: #8B0000; /* Crimson Red */
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 80px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.logo-text h1 .full-name {
    display: inline;
}

.logo-text h1 .short-name {
    display: none;
}

.logo-text p .full-name-en {
    display: inline;
}

.logo-text p .short-name-en {
    display: none;
}

.logo-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #FFD700; /* Sun Gold */
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.language-switcher a {
    color: white;
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    border: 1px solid white;
    border-radius: 4px;
    transition: all 0.3s;
}

.language-switcher a:hover,
.language-switcher .lang-active {
    background: #FFD700;
    color: #8B0000;
    border-color: #FFD700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #8B0000, #B22222);
    color: white;
    padding: 4rem 0;
    display: flex;
    align-items: center;
    min-height: 70vh;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: 'RUC';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 58rem;
    font-weight: bold;
    font-family: 'Arial', 'Helvetica', sans-serif;
    color: rgba(0, 0, 0, 0.08);
    z-index: 1;
    line-height: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    z-index: 2;
    position: relative;
}

.hero-text {
    text-align: left;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #FFD700;
}

.hero-motto {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-seal {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-seal img {
    width: 400px;
    height: auto;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-primary {
    background: #FFD700;
    color: #8B0000;
}

.btn-primary:hover {
    background: #FFA500;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #8B0000;
}

.btn-outline {
    background: transparent;
    color: #8B0000;
    border-color: #8B0000;
}

.btn-outline:hover {
    background: #8B0000;
    color: white;
}

/* Quick Links Section */
.quick-links {
    padding: 4rem 0;
    background: #f8f9fa;
}

.quick-links h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #8B0000;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.quick-link {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-align: center;
}

.quick-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.quick-link-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.quick-link h3 {
    color: #8B0000;
    margin-bottom: 1rem;
}

/* Stats Section */
.stats {
    padding: 4rem 0;
    background: #8B0000;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.2rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #8B0000;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #8B0000;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
}

/* News Section */
.news-preview {
    padding: 4rem 0;
    background: #f8f9fa;
}

.news-preview h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #8B0000;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    padding: 1.5rem;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-content h3 {
    color: #8B0000;
    margin-bottom: 0.5rem;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more {
    color: #8B0000;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    color: #B22222;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #FFD700;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #FFD700;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-seal {
    height: 200px;
    width: auto;
    opacity: 0.7;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

/* Software Page Styles */
.software-hero {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.software-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.software-card:hover {
    transform: translateY(-5px);
}

.software-header {
    background: #8B0000;
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.software-header .software-icon-top {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.software-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.software-header .github-link {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
}

.software-header .github-link:hover {
    background: rgba(255,255,255,0.2);
}

.software-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.software-body {
    padding: 2rem;
}

.software-features {
    list-style: none;
    margin: 1rem 0;
}

.software-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.software-features li:last-child {
    border-bottom: none;
}

.download-section {
    background: #f8f9fa;
    padding: 2rem 0;
    text-align: center;
    border-top: 3px solid #8B0000;
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.download-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    height: 50px;
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

.platform-icon {
    width: 20px;
    height: 20px;
    opacity: 0.9;
}

/* Platform Icons as SVG Data URLs */
.macos-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    display: inline-block;
}

.windows-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 12V6.75l6-1.32v6.48L3 12m17-9v8.75l-10 .15V5.21L20 3M3 13l6 .09v6.81l-6-1.15V13m17 .25V22l-10-1.91V13.1l10 .15z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    display: inline-block;
}

.github-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33c.85 0 1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    display: inline-block;
}

.linux-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12.5 1.5c-.83 0-1.5.67-1.5 1.5v.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V3c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V3c0-.83-.67-1.5-1.5-1.5zm-6 4c-.83 0-1.5.67-1.5 1.5v1c0 .28-.22.5-.5.5s-.5-.22-.5-.5v-1c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v1c0 .28-.22.5-.5.5s-.5-.22-.5-.5v-1c0-.83-.67-1.5-1.5-1.5zm11 0c-.83 0-1.5.67-1.5 1.5v1c0 .28-.22.5-.5.5s-.5-.22-.5-.5v-1c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v1c0 .28-.22.5-.5.5s-.5-.22-.5-.5v-1c0-.83-.67-1.5-1.5-1.5zM12 9c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0 2c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Responsive download buttons grid */
@media (max-width: 768px) {
    .download-buttons {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .download-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .download-buttons {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Detail Page Styles */
.detail-hero {
    background: linear-gradient(135deg, #8B0000, #B22222);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.detail-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 20px;
}

.detail-content h2 {
    color: #8B0000;
    margin: 2rem 0 1rem;
    font-size: 2rem;
}

.detail-content h3 {
    color: #8B0000;
    margin: 1.5rem 0 0.5rem;
    font-size: 1.5rem;
}

.detail-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.detail-content li {
    margin: 0.5rem 0;
}

.detail-content code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.detail-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.requirements-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.requirements-table th,
.requirements-table td {
    border: 1px solid #ddd;
    padding: 0.8rem;
    text-align: left;
}

.requirements-table th {
    background: #8B0000;
    color: white;
}

.terms-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 2rem;
    margin: 2rem 0;
}

.terms-section h3 {
    color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #8B0000;
        flex-direction: column;
        padding: 1rem 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-right.show {
        display: flex;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .logo-text h1 .full-name {
        display: none;
    }
    
    .logo-text h1 .short-name {
        display: inline;
    }
    
    .logo-text p .full-name-en {
        display: none;
    }
    
    .logo-text p .short-name-en {
        display: inline;
    }
    
    .hero::before {
        font-size: 15rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-seal img {
        width: 200px;
    }
    
    .quick-links-grid,
    .features-grid,
    .news-grid,
    .software-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero::before {
        font-size: 10rem;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-seal img {
        width: 150px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
