/* Rank Scrapper Banner Styles */
.rank-banner {
    max-width: 540px;
    margin: 2em auto 2em auto;
    background: rgba(26, 26, 26, 0.85);
    border-radius: 22px;
    box-shadow: 0 4px 24px #00d4ff22, 0 1.5px 0 #00d4ff33;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 10;
    border: 1.5px solid #00d4ff33;
    backdrop-filter: blur(8px) saturate(140%);
}

.rank-banner a {
    /* text-decoration: none; */
    font-weight: 700;
}

.rank-banner-title {
    font-size: 1.18em;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 0.3em;
    letter-spacing: 0.5px;
}

.rank-banner-desc {
    color: #fff;
    font-size: 1em;
    margin-bottom: 0.7em;
}

.rank-banner-link {
    color: #ff6b6b;
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.2s;
}

.rank-banner-link:hover {
    color: #00d4ff;
}

.rank-banner-btn {
    display: inline-block;
    background: linear-gradient(90deg, #00d4ff, #ff6b6b);
    color: #fff;
    font-weight: 700;
    padding: 0.6em 1.7em;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.08em;
    box-shadow: 0 2px 8px #00d4ff33;
    margin-top: 0.2em;
    transition: background 0.2s, color 0.2s;
}

.rank-banner-btn:hover {
    background: linear-gradient(90deg, #ff6b6b, #00d4ff);
    color: #fff;
}

@media (max-width: 700px) {
    .rank-banner {
        max-width: 98vw;
    }
}

/* Social Icons in Footer */

/* Improved Social Icons in Footer */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin-top: 0.7rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 4px 24px 0 rgba(102, 126, 234, 0.10), 0 1.5px 8px 0 rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(6px);
    border: 2px solid rgba(255, 255, 255, 0.18);
    transition: background 0.25s, transform 0.18s, box-shadow 0.18s, border 0.18s;
    font-size: 1.7em;
    color: #e2e8f0;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.social-icons a:before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 0 16px 6px #667eea;
    z-index: 0;
}

.social-icons a:hover:before {
    opacity: 0.25;
}

.social-icons a:hover {
    background: linear-gradient(135deg, #667eea 60%, #f093fb 100%);
    color: #fff !important;
    transform: translateY(-4px) scale(1.13) rotate(-7deg);
    box-shadow: 0 8px 32px 0 rgba(102, 126, 234, 0.22), 0 2px 12px 0 rgba(0, 0, 0, 0.13);
    border: 2.5px solid #fff;
    text-decoration: none;
}

.social-icons a[title="LinkedIn"] {
    color: #0e76a8;
}

.social-icons a[title="GitHub"] {
    color: #333;
}

.social-icons a[title="Instagram"] {
    color: #e4405f;
}

.social-icons a:hover[title="LinkedIn"] {
    background: linear-gradient(135deg, #0e76a8 60%, #667eea 100%);
    box-shadow: 0 0 18px 2px #0e76a8;
}

.social-icons a:hover[title="GitHub"] {
    background: linear-gradient(135deg, #333 60%, #667eea 100%);
    box-shadow: 0 0 18px 2px #333;
}

.social-icons a:hover[title="Instagram"] {
    background: linear-gradient(135deg, #e4405f 60%, #f093fb 100%);
    box-shadow: 0 0 18px 2px #e4405f;
}

.social-icons i {
    font-size: 1.25em;
    z-index: 1;
    transition: transform 0.18s;
}

.social-icons a:hover i {
    transform: scale(1.22) rotate(10deg);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #0f0f23;
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%,
            rgba(120, 119, 198, 0.3) 0%,
            transparent 50%),
        radial-gradient(circle at 80% 20%,
            rgba(255, 119, 198, 0.3) 0%,
            transparent 50%),
        radial-gradient(circle at 40% 40%,
            rgba(120, 200, 255, 0.3) 0%,
            transparent 50%);
    z-index: -2;
    animation: backgroundMove 20s ease-in-out infinite alternate;
}

@keyframes backgroundMove {
    0% {
        transform: scale(1) rotate(0deg);
    }

    100% {
        transform: scale(1.1) rotate(1deg);
    }
}

/* Navbar */
.navbar {
    background: rgba(18, 18, 36, 0.98);
    backdrop-filter: blur(24px) saturate(140%);
    border-bottom: 2px solid #00d4ff33;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 5000;
    box-shadow: none;
    transition: background 0.3s, box-shadow 0.3s;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    position: relative;
    z-index: 5100;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
    position: relative;
    z-index: 5100;
}

/* .mobile-menu-btn:hover {
          background: rgba(255, 255, 255, 0.1);
      } */

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 18, 36, 0.98);
    backdrop-filter: blur(24px) saturate(140%);
    z-index: 5050;
    padding: 0 1rem 2rem 1rem;
    border-top: 2px solid #00d4ff33;
    box-shadow: none;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(.77, 0, .18, 1), background 0.3s;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1.5px solid #00d4ff33;
    padding-bottom: 1.2rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-menu-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-menu-links a:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
}

h1 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input,
select {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    background: rgba(15, 15, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #e2e8f0;
    transition: all 0.3s ease;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background: rgba(15, 15, 35, 0.8);
}

input::placeholder {
    color: #64748b;
}

/* Custom Select Arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.detected-branch {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid #667eea;
    color: #a5b4fc;
    font-weight: 600;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.875rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

button {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    min-height: 48px;
    /* Better touch targets */
}

.primary-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.success-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

button:disabled {
    background: rgba(100, 116, 139, 0.3) !important;
    color: #64748b !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Privacy Section */
.privacy-section {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
}

.privacy-title {
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.privacy-text {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.privacy-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.privacy-link:hover {
    text-decoration: underline;
}

/* Results Section */
.result {
    margin-top: 2rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-card {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.loading {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.5);
    color: #a5b4fc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.details {
    background: rgba(15, 15, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-weight: 600;
    color: #e2e8f0;
    word-break: break-word;
}

/* Table Styles */
.table-container {
    background: rgba(15, 15, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

th,
td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.critical-score {
    background: rgba(128, 25, 25, 0.445);
}

th {
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    color: #e2e8f0;
    font-size: 0.875rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.subject-name {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Footer */
.footer {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-text {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

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

.footer-text a:hover {
    text-decoration: underline;
}

/* Agreement Section */
.agreement-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.agreement-section.show {
    transform: translateY(0);
}

.agreement-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.agreement-text {
    color: #d1d5db;
    font-size: 0.85rem;
    flex: 1;
    line-height: 1.4;
}

.agreement-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.agreement-buttons button {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: auto;
    flex: none;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: row-reverse;
    }

    .mobile-menu {
        display: block;
    }

    .main-content {
        padding: 0.75rem;
    }

    .container {
        padding: 1.5rem;
        border-radius: 16px;
        margin-top: 0.5rem;
    }

    h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .form-section {
        margin-bottom: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .details {
        padding: 1.25rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    th,
    td {
        padding: 0.625rem;
        font-size: 0.8rem;
    }

    .table-container {
        margin: 1rem -0.5rem 2rem -0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .agreement-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .agreement-buttons {
        width: 100%;
        justify-content: center;
    }

    .agreement-buttons button {
        flex: 1;
        max-width: 120px;
    }

    .privacy-section {
        padding: 1rem;
    }

    .privacy-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 0.75rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .container {
        padding: 1.25rem;
        margin: 0.25rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    input,
    select,
    button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
    }

    .subject-name {
        font-size: 0.7rem;
    }

    .detail-value {
        font-size: 0.9rem;
    }

    .spinner {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.35rem;
    }

    .agreement-buttons button {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    table {
        min-width: 400px;
    }
}

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .main-content {
        padding: 0.5rem;
    }

    .container {
        margin: 0.25rem;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .subtitle {
        margin-bottom: 1rem;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .footer,
    .agreement-section,
    .action-buttons,
    .mobile-menu-btn {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    body::before {
        display: none !important;
    }

    .container {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    .details {
        background: #f8f9fa !important;
        border: 1px solid #ccc !important;
    }

    .table-container {
        background: white !important;
        border: 1px solid #ccc !important;
    }

    th {
        background: #f8f9fa !important;
        color: black !important;
    }

    td {
        color: black !important;
    }

    h1 {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }

    .logo {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for better accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Better touch targets */
@media (pointer: coarse) {

    button,
    input,
    select,
    .nav-links a {
        min-height: 44px;
    }
}