:root {
    --main-color: #1c1d24;
    --accent-color: #4a90e2;
    --gradient-start: #4a90e2;
    --gradient-end: #67b26f;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.1);
    --nav-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--main-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--nav-height);
    background: rgba(28, 29, 36, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 5px;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-links a, 
a {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

ul {
    list-style-type: none; /* Removes default bullets */
    margin: 1rem 0;
    padding: 0;
}

ul li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: background 0.3s ease, transform 0.2s;
    position: relative;
}

ul li:hover {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    transform: translateY(-2px);
}

ul li .icon {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

ul li:hover .icon {
    color: #fff; /* Optional hover color for icons */
}

ul li span {
    font-size: 1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

ul li:hover span {
    color: #fff; /* Optional hover color for text */
}


.nav-links a:hover, 
a:hover {
    text-decoration: none;
}

.about-text h2, 
.about-text h4 {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    margin-bottom: 1rem;
    margin-top: 1rem;
}


.nav-links a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Main Content */
main {
    padding-top: var(--nav-height);
}

.hero {
    text-align: center;
    padding: 2rem 1rem 2rem;
    background: linear-gradient(180deg, rgba(28, 29, 36, 0.8) 0%, rgba(28, 29, 36, 1) 100%);
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Detector Section */
.detector-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.input-container {
    flex: 1;
    min-width: 300px;
}

.result-container {
    flex: 1;
    min-width: 300px;
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.result-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#content-input {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    resize: vertical;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.8rem 2rem;
    border: none;
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

textarea, input[type="url"] {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea {
    min-height: 200px;
}

textarea:focus, input[type="url"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.gradient-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s;
}

.gradient-btn:hover {
    transform: translateY(-2px);
}

/* Result Section */
.result-container {
    margin-top: 2rem;
}

.result-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.detection-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: slideDown 0.5s ease-out;
}

.detection-badge.human {
    background: linear-gradient(135deg, #00C851, #007E33);
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.detection-badge.ai {
    background: linear-gradient(135deg, #ff4444, #CC0000);
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.result-content {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.score-circle {
    position: relative;
    margin: auto;
    width: 150px;
    height: 150px;
    animation: scaleIn 0.5s ease-out;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease-out;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.score-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.result-details {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.raw-output {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.raw-output h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.output-content {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* Error and Loading States */
.error {
    background: rgba(255, 68, 68, 0.1);
    border-left: 4px solid #ff4444;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.error h3 {
    color: #ff4444;
    margin: 0 0 0.5rem 0;
}

.error p {
    margin: 0;
    opacity: 0.9;
}

.error-details {
    font-family: monospace;
    margin-top: 0.5rem !important;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    font-size: 0.9rem;
}

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Features Section */
.features-section {
    padding: 4rem 5%;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Ensure 3 columns per row */
    gap: 2rem; /* Maintain spacing between cards */
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    transition: transform 0.3s;
}

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

.feature-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* About Section */
.about-section {
    padding: 4rem 5%;
    background: linear-gradient(180deg, var(--main-color) 0%, rgba(28, 29, 36, 0.95) 100%);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
}

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

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--gradient-end);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 500px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.footer-links {
    margin: 1rem 0;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4CAF50;
}

.policy-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.policy-content h1 {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.policy-content section {
    margin: 2rem 0;
}

.policy-content h2 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.policy-content ul {
    list-style-type: disc;
    margin-left: 2rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: rgba(28, 29, 36, 0.95);
        padding: 1rem 0;
        flex-direction: column;
        align-items: center;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .detector-container {
        padding: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .result-card {
        padding: 1.5rem;
    }

    .detection-badge {
        font-size: 1.2rem;
        padding: 0.8rem;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-value {
        font-size: 1.5rem;
    }

    .result-header {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        font-size: 1.4rem;
        letter-spacing: 3px;
        line-height: 1.2;
    }
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row for tablets */
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr; /* 1 card per row for mobile */
    }
}

.how-to-use {
    padding: 2rem 0;
}

.how-to-use .gradient-text {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.steps-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.step-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.step-number {
    position: absolute;
    top: -20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.step-content {
    margin-top: 1rem;
}

.step-content h4 {
    color: var(--gradient-end);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.step-content p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
        align-items: center;
    }
    
    .step-card {
        width: 90%;
        max-width: none;
    }
}

/* Final Words heading styles */
.final-words-heading {
    text-align: center; /* Center on desktop */
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .final-words-heading {
        text-align: left; /* Left-aligned on mobile */
    }
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .detector-container {
        flex-direction: column;
    }

    .input-container,
    .result-container {
        min-width: 100%;
    }

    .result-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .result-content {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .score-circle {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    .progress-ring {
        position: absolute;
    }

    .score-content {
        z-index: 1;
        text-align: center;
    }
}
