@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    word-wrap: break-word;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.header {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 10;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    line-height: 0;
}

.logo {
    height: 36px;
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    display: block;
}

.logo-link:hover .logo {
    transform: scale(1.05);
    opacity: 0.9;
}

h1 {
    color: #1a202c;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 12px;
    font-size: 3em;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1e3c72 0%, #7e22ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 40px;
    font-size: 1.1em;
    font-weight: 400;
}

.search-container {
    margin-bottom: 40px;
}

.input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.15em;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 16px;
    animation: slideDown 0.5s ease-out;
}

.label-icon {
    font-size: 1.3em;
    animation: bounce 2s infinite;
}

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

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

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(126, 34, 206, 0.2), 0 0 0 0 rgba(126, 34, 206, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(126, 34, 206, 0.3), 0 0 0 8px rgba(126, 34, 206, 0.1);
    }
}

.input-section {
    display: flex;
    gap: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
    animation: pulseGlow 3s ease-in-out infinite;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 20px;
    font-size: 1.3em;
    pointer-events: none;
    z-index: 1;
}

#profileUrl {
    width: 100%;
    padding: 18px 24px 18px 56px;
    border: 3px solid #7e22ce;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background: white;
    transition: all 0.3s ease;
    font-weight: 500;
    text-overflow: ellipsis;
}

#profileUrl:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 4px rgba(126, 34, 206, 0.2), 0 8px 24px rgba(126, 34, 206, 0.15);
    transform: translateY(-2px);
}

#profileUrl::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

#fetchBtn {
    padding: 16px 36px;
    background: linear-gradient(135deg, #7e22ce 0%, #5b21b6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(126, 34, 206, 0.3);
    white-space: nowrap;
}

#fetchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(126, 34, 206, 0.4);
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
}

#fetchBtn:active {
    transform: translateY(0);
}

#fetchBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    padding: 60px 40px;
}

.loading p {
    color: #64748b;
    font-weight: 500;
    margin-top: 8px;
}

.spinner {
    border: 4px solid #e2e8f0;
    border-top: 4px solid #7e22ce;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid #dc2626;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.hidden {
    display: none;
}

.results {
    animation: fadeIn 0.6s ease-out;
}

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

.results h2 {
    color: #1a202c;
    margin-bottom: 24px;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.profile-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 28px;
    border-radius: 16px;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-item {
    margin-bottom: 14px;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    color: #7e22ce;
    margin-right: 12px;
    font-weight: 600;
    min-width: 100px;
}

.info-item span {
    color: #334155;
    font-weight: 500;
}

.images-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.image-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.image-card h3 {
    color: #1a202c;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
}

.image-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
    display: block;
}

.image-card img:hover {
    transform: scale(1.02);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #7e22ce 0%, #5b21b6 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(126, 34, 206, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(126, 34, 206, 0.4);
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
}

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

.download-btn::before {
    content: '⬇';
    font-size: 16px;
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .container {
        padding: 30px 20px;
        margin: 16px auto;
    }

    .header {
        top: 20px;
        left: 20px;
    }

    .logo {
        height: 28px;
    }

    h1 {
        font-size: 2.2em;
        margin-top: 60px;
    }

    .subtitle {
        font-size: 1em;
        margin-bottom: 32px;
    }

    .input-label {
        font-size: 1em;
    }

    .input-section {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    #profileUrl {
        padding: 17px 20px 17px 50px;
        font-size: 16px;
    }

    .input-icon {
        left: 16px;
        font-size: 1.2em;
    }

    #fetchBtn {
        width: 100%;
        padding: 18px;
        font-size: 16px;
        min-height: 48px;
    }

    .images-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .results h2 {
        font-size: 1.6em;
    }

    .profile-info {
        padding: 24px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 16px;
    }

    .info-item strong {
        min-width: auto;
    }

    .image-card {
        padding: 20px;
    }

    .download-btn {
        padding: 14px 32px;
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 24px 16px;
        margin: 12px auto;
    }

    .header {
        top: 16px;
        left: 16px;
    }

    .logo {
        height: 26px;
    }

    h1 {
        font-size: 1.9em;
        margin-top: 55px;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 0.95em;
        margin-bottom: 28px;
        line-height: 1.5;
    }

    .input-label {
        font-size: 0.95em;
    }

    #profileUrl {
        padding: 16px 16px 16px 48px;
        font-size: 16px;
    }

    .input-icon {
        left: 14px;
        font-size: 1.15em;
    }

    #fetchBtn {
        padding: 17px;
        min-height: 50px;
    }

    .profile-info {
        padding: 20px;
    }

    .image-card {
        padding: 18px;
    }

    .image-card h3 {
        font-size: 1.2em;
    }

    .results h2 {
        font-size: 1.5em;
    }
}

/* Extra small devices (iPhone SE, Galaxy Fold, etc.) */
@media (max-width: 375px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 20px 14px;
        margin: 10px auto;
        border-radius: 20px;
    }

    .header {
        top: 14px;
        left: 14px;
    }

    .logo {
        height: 24px;
    }

    h1 {
        font-size: 1.65em;
        margin-top: 52px;
        line-height: 1.15;
    }

    .subtitle {
        font-size: 0.9em;
        margin-bottom: 24px;
    }

    .input-label {
        font-size: 0.9em;
        gap: 6px;
    }

    .input-section {
        padding: 10px;
    }

    #profileUrl {
        padding: 15px 14px 15px 46px;
        font-size: 16px;
    }

    .input-icon {
        left: 12px;
    }

    #fetchBtn {
        padding: 16px;
        font-size: 15px;
    }

    .profile-info {
        padding: 18px;
    }

    .info-item {
        font-size: 15px;
    }

    .image-card {
        padding: 16px;
    }

    .image-card h3 {
        font-size: 1.15em;
    }

    .download-btn {
        padding: 13px 28px;
        font-size: 14px;
    }

    .results h2 {
        font-size: 1.4em;
    }
}

/* Very small devices (320px - older phones) */
@media (max-width: 360px) {
    body {
        padding: 6px;
    }

    .container {
        padding: 18px 12px;
        margin: 8px auto;
    }

    h1 {
        font-size: 1.5em;
        margin-top: 50px;
    }

    .subtitle {
        font-size: 0.85em;
    }

    .input-label {
        font-size: 0.85em;
    }

    #profileUrl {
        padding: 14px 12px 14px 44px;
    }

    .profile-info {
        padding: 16px;
    }

    .image-card {
        padding: 14px;
    }

    .download-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* SEO Content Section */
.seo-content {
    max-width: 1000px;
    margin: 60px auto 40px;
    padding: 0 20px;
}

.features-section {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.features-section h2 {
    color: #1a202c;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #1e3c72 0%, #7e22ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-section > p {
    color: #475569;
    font-size: 1.1em;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 40px;
}

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

.feature-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(126, 34, 206, 0.15);
}

.feature-box h3 {
    color: #7e22ce;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-box p {
    color: #64748b;
    font-size: 0.95em;
    line-height: 1.6;
}

.how-to-section {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.how-to-section h2 {
    color: #1a202c;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    background: linear-gradient(135deg, #1e3c72 0%, #7e22ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steps-list {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 32px 32px 32px 56px;
    border-radius: 16px;
    border-left: 4px solid #7e22ce;
    margin-bottom: 24px;
}

.steps-list li {
    color: #334155;
    font-size: 1.05em;
    line-height: 2;
    font-weight: 500;
}

.how-to-section > p {
    color: #475569;
    font-size: 1em;
    line-height: 1.8;
    text-align: center;
}

.faq-section {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.faq-section h2 {
    color: #1a202c;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    background: linear-gradient(135deg, #1e3c72 0%, #7e22ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 24px 28px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid #7e22ce;
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(126, 34, 206, 0.12);
}

.faq-item h3 {
    color: #1a202c;
    font-size: 1.15em;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
}

.faq-item p {
    color: #475569;
    font-size: 1em;
    line-height: 1.7;
}

.footer {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.footer p {
    color: #64748b;
    font-size: 0.95em;
    margin: 8px 0;
}

.footer .disclaimer {
    font-size: 0.85em;
    color: #94a3b8;
    font-style: italic;
}

@media (max-width: 768px) {
    .seo-content {
        padding: 0 12px;
        margin-top: 40px;
    }

    .features-section,
    .how-to-section,
    .faq-section,
    .footer {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .features-section h2,
    .how-to-section h2,
    .faq-section h2 {
        font-size: 1.6em;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-box {
        padding: 24px;
    }

    .steps-list {
        padding: 24px 24px 24px 40px;
    }

    .faq-item h3 {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .seo-content {
        padding: 0 10px;
        margin-top: 32px;
    }

    .features-section,
    .how-to-section,
    .faq-section,
    .footer {
        padding: 28px 18px;
    }

    .features-section h2,
    .how-to-section h2,
    .faq-section h2 {
        font-size: 1.45em;
        line-height: 1.3;
    }

    .features-section > p,
    .how-to-section > p {
        font-size: 1em;
        line-height: 1.6;
    }

    .feature-box {
        padding: 20px;
    }

    .feature-box h3 {
        font-size: 1.1em;
    }

    .feature-box p {
        font-size: 0.9em;
    }

    .steps-list {
        padding: 20px 20px 20px 36px;
    }

    .steps-list li {
        font-size: 1em;
        line-height: 1.8;
    }

    .faq-item {
        padding: 18px 20px;
    }

    .faq-item h3 {
        font-size: 1.05em;
    }

    .faq-item p {
        font-size: 0.95em;
    }
}

@media (max-width: 375px) {
    .seo-content {
        padding: 0 8px;
    }

    .features-section,
    .how-to-section,
    .faq-section,
    .footer {
        padding: 24px 16px;
        border-radius: 18px;
    }

    .features-section h2,
    .how-to-section h2,
    .faq-section h2 {
        font-size: 1.35em;
    }

    .feature-box {
        padding: 18px;
    }

    .steps-list {
        padding: 18px 18px 18px 32px;
        font-size: 0.95em;
    }

    .faq-item {
        padding: 16px 18px;
    }
}

@media (max-width: 360px) {
    .features-section,
    .how-to-section,
    .faq-section,
    .footer {
        padding: 20px 14px;
    }

    .features-section h2,
    .how-to-section h2,
    .faq-section h2 {
        font-size: 1.25em;
    }

    .feature-box {
        padding: 16px;
    }

    .faq-item {
        padding: 14px 16px;
    }
}
