/* Page Speed Checker Styles - Matching Website Design */
:root {
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;
    --space-5xl: 5rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --text-primary-color: #ffffff;
    --text-secondary-color: rgba(255, 255, 255, 0.8);
    --background-color: #000000;
    --primary-color: #4ade80;
    --accent-color: #22c55e;

    /* Typography Scale */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Status Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;

    /* Transition */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/desktop Bg image.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

/* Mobile background */
@media (max-width: 768px) {
    body {
        background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/mobile Bg image.webp');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Back Button */
.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.back-button i {
    font-size: 16px;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 80px 0 60px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: #4ade80;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.page-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Section */
.tool-section {
    padding: 2rem 0 4rem;
}

.tool-container {
    display: grid;
    gap: 2rem;
}

/* Input Section */
.input-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.input-section:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.input-card {
    padding: 2rem;
}

.input-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    justify-content: center;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.input-group input:focus {
    outline: none;
    border-color: #4ade80;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

/* Device Selection */
.device-selection {
    margin-bottom: 2rem;
}

.device-selection label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    text-align: center;
}

.device-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.device-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 120px;
    text-align: center;
}

.device-tab:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.device-tab.active {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #4ade80;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.device-tab i {
    font-size: 1rem;
}

/* Button Container */
.button-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Inter', sans-serif;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.btn-primary {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.results-section:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.results-card {
    padding: 2rem;
}

.results-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Result Tabs */
.result-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.result-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-tab:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.result-tab.active {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #4ade80;
    color: white;
}

/* Results Content */
.results-content {
    display: grid;
    gap: 2rem;
}

/* Score Overview */
.score-overview {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-display {
    margin-bottom: 1rem;
}

.score-number {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.score-good {
    color: #10b981;
}

.score-needs-improvement {
    color: #f59e0b;
}

.score-poor {
    color: #ef4444;
}

.score-label {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.metric-name {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.metric-score {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-score-good {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.metric-score-average {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.metric-score-poor {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Screenshots Section */
.screenshots-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.screenshots-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.screenshot-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.screenshot-item:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
}

.screenshot-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.screenshot-label {
    padding: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
}

/* Opportunities Section */
.opportunities-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.opportunities-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opportunities-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.opportunity-item {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.opportunity-title {
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.opportunity-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.opportunity-value {
    color: white;
    font-weight: 500;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 3rem 2rem;
}

.loading-card {
    display: inline-block;
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid #4ade80;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.loading-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.progress-bar {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

.features-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #ffffff, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: #ffffff;
}

.feature-card p {
    opacity: 0.8;
    line-height: 1.6;
    margin: 0;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.how-it-works .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.how-it-works-header {
    text-align: center;
    margin-bottom: 3rem;
}

.how-it-works-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.how-it-works-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.step:hover {
    transform: translateY(-5px);
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.step-content h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* FAQ Section */
.faq {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #4ade80;
}

.faq-toggle {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4ade80;
    transition: all 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 2rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Error Notification */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.error-content {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.error-content i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.error-content span {
    flex: 1;
    font-weight: 500;
}

.error-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.error-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .back-button {
        top: 16px;
        left: 16px;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 20px;
    }

    .page-header {
        padding: 80px 0 40px;
    }

    .page-header h1 {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }

    .page-header p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .tool-container {
        gap: 20px;
    }

    .input-card,
    .results-card {
        padding: 20px;
    }

    .device-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }

    .device-tab {
        justify-content: center;
        min-width: auto;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .result-tabs {
        flex-direction: column;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .score-number {
        font-size: 3rem;
    }

    .faq-header h2 {
        font-size: 2rem;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .step {
        padding: 1.5rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .error-notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .error-content {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .progress-bar {
        width: 250px;
    }

    .device-tab {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
}
