/* FirmwareMirror - Page Specific Styles */

/* ========== DEVICE PAGE STYLES ========== */

/* Firmware List Container */
.firmware-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Firmware Section Styles */
.firmware-section {
    margin-bottom: 50px;
    padding: 0;
    width: 100%;
    display: block;
    flex: none;
}

.firmware-name-heading {
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    margin: 30px 0 20px 0;
    padding: 15px 0;
    border-bottom: 3px solid #667eea;
}

/* Section Description for SEO */
.section-description {
    font-size: 1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 15px 0;
    border-left: 4px solid #667eea;
    padding-left: 15px;
}

/* Firmware Table Styles */
.firmware-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    table-layout: fixed;
    min-width: 900px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.firmware-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 3px solid #5568d3;
}

.firmware-table th {
    padding: 16px 14px;
    text-align: left;
    font-weight: 700;
    color: white;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.firmware-table th:last-child {
    border-right: none;
}

.firmware-table td {
    padding: 14px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    color: #333;
    font-size: 0.9em;
    word-break: break-word;
    overflow: hidden;
}

.firmware-table td:last-child {
    border-right: none;
}

.firmware-row {
    transition: all 0.2s ease;
}

.firmware-row:hover {
    background-color: #f8f9fa;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.1);
}

.firmware-row:last-child td {
    border-bottom: none;
}

.version-cell {
    font-weight: 700;
    color: #667eea;
    white-space: nowrap;
    font-size: 0.95em;
}

.method-cell {
    text-align: center;
}

.method-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 0.85em;
    border-radius: 20px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #bbdefb;
    text-transform: capitalize;
}

.method-badge.method-unknown {
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
}

.md5-full {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 8px 10px;
    border-radius: 4px;
    color: #555;
    font-size: 0.8em;
    display: block;
    word-break: break-all;
    line-height: 1.6;
    max-height: 70px;
    overflow-y: auto;
    border-left: 3px solid #667eea;
}

.btn-download-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid #667eea;
    white-space: nowrap;
}

.btn-download-table:hover {
    background: #764ba2;
    border-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Device page responsive design */
@media (max-width: 1200px) {
    .firmware-table {
        min-width: 800px;
        font-size: 0.85em;
    }

    .firmware-table th,
    .firmware-table td {
        padding: 10px 8px;
    }

    .md5-full {
        font-size: 0.7em;
    }
}

@media (max-width: 992px) {
    .firmware-table {
        min-width: 750px;
        font-size: 0.8em;
    }

    .firmware-table th,
    .firmware-table td {
        padding: 9px 7px;
    }

    .firmware-name-heading {
        font-size: 1.5em;
    }

    .md5-full {
        font-size: 0.65em;
    }
}

@media (max-width: 768px) {
    .firmware-section {
        margin-bottom: 40px;
    }

    .firmware-name-heading {
        font-size: 1.3em;
        margin: 20px 0 15px 0;
    }

    .firmware-table {
        min-width: 650px;
        font-size: 0.75em;
    }

    .firmware-table th {
        padding: 8px 5px;
    }

    .firmware-table td {
        padding: 8px 5px;
    }

    .md5-full {
        font-size: 0.6em;
        padding: 4px 5px;
        max-height: 50px;
    }

    .btn-download-table {
        padding: 6px 8px;
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .firmware-section {
        margin-bottom: 25px;
    }

    .firmware-name-heading {
        font-size: 1.1em;
        padding: 8px 0;
        margin: 12px 0 8px 0;
    }

    .firmware-table {
        min-width: 500px;
        font-size: 0.65em;
    }

    .firmware-table th {
        padding: 6px 4px;
    }

    .firmware-table td {
        padding: 6px 4px;
    }

    .md5-full {
        display: none;
    }

    .btn-download-table {
        padding: 4px 6px;
        font-size: 0.6em;
        gap: 2px;
    }
}

/* ========== ROM DETAIL PAGE STYLES ========== */

.rom-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.info-card h3 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
}

.info-card p {
    margin: 0;
    font-size: 1.1em;
    color: #333;
    word-break: break-all;
}

.mirrors-section {
    margin-top: 40px;
}

.mirrors-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 25px;
    color: #333;
}

.changelog-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 30px;
    margin-bottom: 40px;
}

.changelog-section h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 15px;
}

.changelog-content {
    color: #555;
    line-height: 1.8;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Compact Mirrors Layout */
.mirrors-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.mirror-btn {
    padding: 10px 18px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9em;
    min-width: 120px;
}

.mirror-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mirror-info {
    font-size: 0.85em;
    color: #999;
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    line-height: 1.6;
}

.md5-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.md5-box h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}

.md5-hash {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85em;
    word-break: break-all;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.btn-copy-small {
    padding: 8px 15px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85em;
}

.btn-copy-small:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.no-mirrors {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #999;
}

/* ========== INDEX/HOMEPAGE STYLES ========== */

/* Hero Section */
.hero {
    background: #667eea;
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero > div > p:first-of-type {
    font-size: 1.3em;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero > div > p:nth-of-type(2) {
    font-size: 1.1em;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero .search-form {
    max-width: 600px;
    margin: 0 auto;
}

.hero .search-form > div {
    display: flex;
    gap: 10px;
}

.hero .search-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    min-height: 50px;
}

.hero .search-form button {
    padding: 15px 30px;
    background: #ff6b00;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    min-height: 50px;
    white-space: nowrap;
}

.hero .search-form button:hover {
    background: #e55a00;
    transform: translateY(-2px);
}

.hero > div > p:last-child {
    margin-top: 15px;
    opacity: 0.8;
    font-size: 0.95em;
}

/* Statistics Section */
.statistics-section {
    background: white;
    padding: 60px 20px;
    border-top: 1px solid #eee;
}

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

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    color: #666;
}

.stat-description {
    color: #999;
    margin-top: 5px;
}

/* Latest Phones Grid */
.latest-devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* View All Link */
.view-all-link {
    display: inline-block;
    padding: 15px 40px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 40px;
}

.view-all-link:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.view-all-firmware-link {
    display: inline-block;
    padding: 12px 35px;
    background: #ff6b00;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.view-all-firmware-link:hover {
    background: #e55a00;
    transform: translateY(-2px);
}

/* Firmware Table */
.firmware-table-section {
    background: white;
    padding: 60px 20px;
}

.firmware-table-section h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    color: #333;
}

.firmware-table-section > div > p {
    color: #666;
    margin-bottom: 40px;
    font-size: 1.05em;
}

.latest-firmware-table {
    width: 100%;
    border-collapse: collapse;
}

.latest-firmware-table thead tr {
    background: #667eea;
    color: white;
}

.latest-firmware-table th {
    padding: 15px;
    text-align: left;
    border: none;
}

.latest-firmware-table tbody tr {
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.latest-firmware-table tbody tr:hover {
    background: #f9f9f9;
}

.latest-firmware-table td {
    padding: 15px;
}

.latest-firmware-table td strong {
    color: #333;
}

.latest-firmware-table td:not(:first-child) {
    color: #666;
}

.firmware-type-badge {
    display: inline-block;
    padding: 5px 12px;
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.firmware-type-ota {
    background: #667eea;
}

.firmware-type-fastboot {
    background: #ff6b00;
}

/* Features Section */
.features-section {
    background: white;
    padding: 60px 20px;
}

.features-section h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
}

.features-section > div > p {
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.05em;
}

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

.feature-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-icon.blue { color: #667eea; }
.feature-icon.purple { color: #764ba2; }
.feature-icon.orange { color: #ff6b00; }
.feature-icon.teal { color: #1abc9c; }
.feature-icon.green { color: #27ae60; }
.feature-icon.red { color: #e74c3c; }

.feature-card h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #333;
}

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

/* FAQ Section */
.faq-section {
    background: #f9f9f9;
    padding: 60px 20px;
}

.faq-section h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
}

.faq-section > div > p {
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.05em;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.faq-item.border-purple { border-left-color: #764ba2; }
.faq-item.border-orange { border-left-color: #ff6b00; }
.faq-item.border-teal { border-left-color: #1abc9c; }
.faq-item.border-green { border-left-color: #27ae60; }

.faq-item summary {
    font-weight: 600;
    color: #333;
    font-size: 1.05em;
    outline: none;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    color: #667eea;
}

.faq-item p {
    margin-top: 15px;
    color: #666;
    line-height: 1.6;
}

/* Advertisement Spaces */
.ad-space {
    padding: 30px 0;
    background: #f9f9f9;
}

.ad-wrapper {
    background: white;
    padding: 20px;
    border: 1px dashed #ddd;
    border-radius: 8px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-container {
    background: white;
    padding: 20px;
    border: 1px dashed #ddd;
    border-radius: 8px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
}

.ad-placeholder {
    color: #999;
}

/* Sticky Sidebar Ad */
.ad-sticky {
    position: sticky;
    top: 20px;
    background: white;
    padding: 15px;
    border: 1px dashed #ddd;
    border-radius: 8px;
    text-align: center;
}

.ad-sticky .ad-label {
    margin-bottom: 15px;
}

/* In-Content Ads */
.ad-inline {
    margin: 30px 0;
    text-align: center;
}

.ad-inline .ad-label {
    margin-bottom: 10px;
}

/* Between Items Ads */
.ad-between-items {
    padding: 30px 0;
    text-align: center;
    background: #f9f9f9;
    margin: 20px 0;
    border-radius: 8px;
}

.ad-between-items .ad-label {
    margin-bottom: 10px;
}

/* ========== CONTACT PAGE STYLES ========== */

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.g-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert i {
    min-width: 20px;
    margin-top: 2px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-color: #f44336;
}

.contact-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    border-left: 4px solid #667eea;
}

.contact-info h3 {
    margin-top: 0;
    color: #667eea;
}

.info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-item i {
    color: #667eea;
    font-size: 1.2em;
    margin-top: 2px;
    min-width: 20px;
}

.info-item p {
    margin: 0;
    color: #666;
}

.info-item a {
    color: #667eea;
    text-decoration: none;
}

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

/* ========== LATEST FIRMWARE PAGE STYLES ========== */

.latest-page-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-group form {
    display: flex;
    gap: 5px;
}

.filter-group button {
    padding: 10px 20px;
    background: #ff6b00;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-group button:hover {
    background: #e55a00;
}

.download-btn {
    color: #ff6b00;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 12px;
    background: #fff3e0;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #ffe0b2;
    color: #e55a00;
}

/* ========== TERMS OF SERVICE PAGE STYLES ========== */

.terms-container {
    max-width: 900px;
    margin: 0 auto;
}

.last-updated {
    color: #999;
    font-size: 0.95em;
    margin-bottom: 30px;
    font-style: italic;
}

.terms-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    line-height: 1.8;
}

.terms-content h2 {
    font-size: 1.5em;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.terms-content h2:first-child {
    margin-top: 0;
}

.terms-content p {
    color: #666;
    margin-bottom: 15px;
    text-align: justify;
}

.terms-content ul {
    color: #666;
    margin: 15px 0 15px 30px;
    padding: 0;
}

.terms-content li {
    margin-bottom: 10px;
    list-style-type: disc;
}

.terms-content a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s;
}

.terms-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}
