/**
 * SEO Audit Tool - Main Stylesheet
 * Brand Colors: #FF0000, #FF2300
 * Font: Urbanist
 */

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

body.seo-audit-page {
    font-family: 'Urbanist', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.seo-audit-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Form Section */
.seo-audit-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

.form-content {
    max-width: 500px;
    width: 100%;
}

.form-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: #FF0000;
    margin-bottom: 15px;
    line-height: 1.2;
}

.form-subtitle {
    font-family: 'Urbanist', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #555;
    margin-bottom: 35px;
    line-height: 1.6;
}

/* Form Styles */
.audit-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    font-family: 'Urbanist', sans-serif;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.form-group input {
    font-family: 'Urbanist', sans-serif;
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #FF0000;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
}

/* Submit Button */
.submit-btn {
    font-family: 'Urbanist', sans-serif;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF0000 0%, #FF2300 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

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

.submit-btn.loading {
    pointer-events: none;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: block !important;
    position: absolute;
}

/* Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.form-notice {
    font-family: 'Urbanist', sans-serif;
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #888;
}

/* Image Section */
.seo-audit-image-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: transparent;
    position: relative;
}

/* Fallback gradient only when no image */
.seo-audit-image-section.no-image {
    background: linear-gradient(135deg, #FF0000 0%, #FF2300 100%);
}

.image-wrapper {
    max-width: 600px;
    width: 100%;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Results Section */
.seo-audit-results {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    padding: 60px 20px 40px;
}

.results-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.close-results {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #FF0000;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-results:hover {
    background: #FF2300;
    transform: rotate(90deg);
}

.results-header {
    text-align: center;
    margin-bottom: 50px;
}

.results-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 48px;
    font-weight: 800;
    color: #FF0000;
    margin-bottom: 10px;
}

.results-subtitle {
    font-family: 'Urbanist', sans-serif;
    font-size: 20px;
    color: #666;
}

/* Overall Score Card */
.overall-score-card {
    background: linear-gradient(135deg, #FF0000 0%, #FF2300 100%);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    margin-bottom: 50px;
    box-shadow: 0 20px 60px rgba(255, 0, 0, 0.3);
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 15;
}

.score-progress {
    fill: none;
    stroke: white;
    stroke-width: 15;
    stroke-dasharray: 565;
    stroke-dashoffset: 565;
    stroke-linecap: round;
    transition: stroke-dashoffset 2s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.score-number {
    font-family: 'Urbanist', sans-serif;
    display: block;
    font-size: 60px;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    font-family: 'Urbanist', sans-serif;
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-top: 5px;
}

.score-grade {
    font-family: 'Urbanist', sans-serif;
    color: white;
    font-size: 72px;
    font-weight: 800;
}

/* Category Scores */
.category-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.category-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.category-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.category-score {
    font-family: 'Urbanist', sans-serif;
    font-size: 48px;
    font-weight: 800;
    color: #FF0000;
    margin-bottom: 10px;
}

.category-grade {
    font-family: 'Urbanist', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #666;
}

/* PageSpeed Section */
.pagespeed-section {
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

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

.pagespeed-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.pagespeed-card h4 {
    font-family: 'Urbanist', sans-serif;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.pagespeed-score {
    font-family: 'Urbanist', sans-serif;
    text-align: center;
    font-size: 48px;
    font-weight: 800;
    color: #FF0000;
    margin-bottom: 30px;
}

/* Detailed Results */
.detailed-results {
    margin-bottom: 50px;
}

.detail-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.detail-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #FF0000;
    margin-bottom: 25px;
}

.detail-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.detail-item.status-good {
    border-left-color: #00c853;
}

.detail-item.status-warning {
    border-left-color: #ffa726;
}

.detail-item.status-error {
    border-left-color: #ff5252;
}

.detail-item-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 16px;
}

.status-good .detail-item-icon {
    background: #e8f5e9;
    color: #00c853;
}

.status-warning .detail-item-icon {
    background: #fff3e0;
    color: #ffa726;
}

.status-error .detail-item-icon {
    background: #ffebee;
    color: #ff5252;
}

.detail-item-content {
    flex: 1;
}

.detail-item-label {
    font-family: 'Urbanist', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 3px;
}

.detail-item-value {
    font-family: 'Urbanist', sans-serif;
    font-size: 14px;
    color: #666;
}

/* PDF Download */
.pdf-download {
    text-align: center;
    padding: 40px 0;
}

.download-btn {
    font-family: 'Urbanist', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #FF0000 0%, #FF2300 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 0, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .seo-audit-container {
        flex-direction: column;
    }
    
    .seo-audit-image-section {
        min-height: 400px;
    }
    
    .form-title {
        font-size: 36px;
    }
    
    .results-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .audit-form {
        padding: 30px;
    }
    
    .form-title {
        font-size: 32px;
    }
    
    .form-subtitle {
        font-size: 16px;
    }
    
    .results-title {
        font-size: 32px;
    }
    
    .category-scores {
        grid-template-columns: 1fr;
    }
    
    .pagespeed-cards {
        grid-template-columns: 1fr;
    }
    
    .overall-score-card {
        padding: 30px;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-number {
        font-size: 48px;
    }
    
    .score-grade {
        font-size: 56px;
    }
}

@media (max-width: 480px) {
    .seo-audit-form-section,
    .seo-audit-image-section {
        padding: 20px;
    }
    
    .audit-form {
        padding: 25px;
    }
    
    .form-title {
        font-size: 28px;
    }
    
    .results-title {
        font-size: 28px;
    }
    
    .category-card,
    .detail-section,
    .pagespeed-card {
        padding: 25px;
    }
}

/* AOS Animations */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-50px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(50px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* Toast Notification Styles */
.seo-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: white;
    color: #333;
    padding: 20px 30px;
    border-radius: 12px;
    font-family: 'Urbanist', sans-serif;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    max-width: 500px;
    text-align: center;
}

.seo-toast-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* Toast Types */
.seo-toast-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.seo-toast-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.seo-toast-info {
    background: linear-gradient(135deg, #FF0000 0%, #FF2300 100%);
    color: white;
}

.seo-toast-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

/* Input Error State */
.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.input-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
}

/* Toast Animation */
@keyframes slideInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideOutScale {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }
}

/* Mobile Toast Adjustments */
@media (max-width: 768px) {
    .seo-toast {
        min-width: 280px;
        max-width: 90%;
        padding: 18px 25px;
        font-size: 15px;
    }
}
