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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-display: swap;
    background: linear-gradient(135deg, #001f3f 0%, #000000 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 100%;
    padding: 20px 40px 40px 40px;
}

header {
    margin-bottom: 40px;
}

/* Header Container - Logo and Navigation */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e8ed;
}

.logo-link {
    display: block;
}

header .logo {
    max-width: 100px;
    height: auto;
    display: block;
}

/* Hamburger Menu (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1000;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1da1f2;
    margin: 3px 0;
    transition: all 0.3s;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Page Navigation */
.page-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-nav a {
    padding: 10px 20px;
    text-decoration: none;
    color: #657786;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 500;
    white-space: nowrap;
}

.page-nav a:hover {
    background: #f0f8ff;
    color: #1da1f2;
}

.page-nav a.active {
    background: #1da1f2;
    color: white;
}

/* Header Content (Title and Subtitle) */
.header-content {
    text-align: center;
}

.header-content h1 {
    color: #1da1f2;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header-content p {
    color: #657786;
    font-size: 1.1em;
    line-height: 1.5em;
}

/* Star Rating Display */
.rating-display {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.stars {
    display: flex;
    gap: 3px;
}

.star {
    color: #FFD700;
    font-size: 1.5em;
    line-height: 1;
}

.star.half {
    position: relative;
    color: #ddd;
}

.star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    color: #FFD700;
    width: 50%;
    overflow: hidden;
}

.rating-text {
    color: #657786;
    font-size: 0.95em;
    font-weight: 500;
}

/* Page Content Styling */
.page-content {
    line-height: 1.8;
}

.page-content section {
    margin-bottom: 40px;
}

.page-content h2 {
    color: #1da1f2;
    font-size: 1.8em;
    margin-bottom: 15px;
    margin-top: 30px;
}

.page-content h3 {
    color: #14171a;
    font-size: 1.3em;
    margin-bottom: 10px;
    margin-top: 20px;
}

.page-content p {
    color: #14171a;
    margin-bottom: 15px;
}

.page-content ul, .page-content ol {
    margin-left: 25px;
    margin-bottom: 15px;
    color: #14171a;
}

.page-content li {
    margin-bottom: 10px;
}

.page-content a {
    color: #1da1f2;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.page-content a:hover {
    border-bottom-color: #1da1f2;
}

.last-updated {
    background: #f8f9fa;
    padding: 10px 15px;
    border-left: 4px solid #1da1f2;
    margin-bottom: 30px;
    color: #657786;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#tweetUrl {
    flex: 1;
    padding: 18px 25px;
    border: 3px solid #1da1f2;
    border-radius: 50px;
    font-size: 17px;
    outline: none;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.1);
    animation: borderPulse 2s ease-in-out infinite;
}

#tweetUrl:focus {
    border-color: #1da1f2;
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.25);
    transform: translateY(-2px);
    animation: none;
}

#tweetUrl::placeholder {
    color: #657786;
    font-weight: 400;
}

@keyframes borderPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(29, 161, 242, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(29, 161, 242, 0.2);
    }
}

#downloadBtn {
    padding: 15px 40px;
    background: #1da1f2;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

#downloadBtn:hover {
    background: #1a91da;
}

#downloadBtn:active {
    transform: scale(0.98);
}

#downloadBtn:disabled {
    background: #aab8c2;
    cursor: not-allowed;
    opacity: 0.6;
}

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

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1da1f2;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error {
    background: #fee;
    color: #c00;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #c00;
}

.result {
    margin-top: 30px;
}

.video-preview {
    margin-bottom: 20px;
}

.video-preview video {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.download-section {
    text-align: center;
}

.download-btn {
    display: inline-block;
    padding: 15px 40px;
    background: #17bf63;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
}

.download-btn:hover {
    background: #14a854;
}

.download-btn:active {
    transform: scale(0.98);
}

.hint {
    margin-top: 15px;
    color: #657786;
    font-size: 0.9em;
}

.hidden {
    display: none;
}

/* Features Section */
.features-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e1e8ed;
}

.features-section h2 {
    text-align: center;
    color: #1da1f2;
    font-size: 2em;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.feature-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(29, 161, 242, 0.15);
}

.feature-item h3 {
    color: #1da1f2;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.feature-item p {
    color: #657786;
    line-height: 1.6;
}

/* How to Use Section */
.how-to-section {
    margin-top: 50px;
    background: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.how-to-section h2 {
    color: #1da1f2;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
}

.tutorial-intro {
    text-align: center;
    margin-bottom: 40px;
}

.tutorial-intro > p {
    font-size: 1.1em;
    color: #657786;
    margin-bottom: 25px;
}

.sample-video-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin: 0 auto;
}

.tutorial-steps {
    margin: 40px 0;
}

.tutorial-step {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tutorial-step:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.15);
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    color: #1da1f2;
    font-size: 1.3em;
    margin-bottom: 10px;
    margin-top: 0;
}

.step-content p {
    color: #14171a;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tutorial-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
    margin: 15px 0 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-caption {
    font-size: 0.9em;
    color: #657786;
    font-style: italic;
    text-align: center;
    margin-top: 8px;
}

.tutorial-tip {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-left: 4px solid #ffc107;
    padding: 20px 25px;
    border-radius: 10px;
    margin-top: 30px;
}

.tutorial-tip h4 {
    color: #856404;
    font-size: 1.1em;
    margin-bottom: 10px;
    margin-top: 0;
}

.tutorial-tip p {
    color: #856404;
    line-height: 1.6;
    margin: 0;
}

/* FAQ Section */
.faq-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e1e8ed;
    content-visibility: auto;
    contain-intrinsic-size: auto 1000px;
}

.faq-section h2 {
    text-align: center;
    color: #1da1f2;
    font-size: 2em;
    margin-bottom: 30px;
}

.faq-item {
    background: #f8f9fa;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    border-left: 4px solid #1da1f2;
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.1);
}

.faq-item h3 {
    color: #1da1f2;
    font-size: 1.2em;
    margin-bottom: 12px;
}

.faq-item p {
    color: #657786;
    line-height: 1.7;
    margin: 0;
}

footer {
    margin-top: 40px;
    text-align: center;
    color: #657786;
    font-size: 0.9em;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e8ed;
}

.footer-nav a {
    color: #1da1f2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #0d8bd9;
    text-decoration: underline;
}

.copyright-disclaimer {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    text-align: left;
}

.copyright-disclaimer h4 {
    color: #856404;
    font-size: 1.2em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copyright-disclaimer p {
    color: #856404;
    line-height: 1.6;
    margin-bottom: 12px;
}

.copyright-disclaimer ul {
    margin-left: 25px;
    margin-bottom: 15px;
    color: #856404;
}

.copyright-disclaimer li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.copyright-disclaimer strong {
    color: #664d03;
}

/* Contact Form Styling */
.contact-form-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    color: #14171a;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #1da1f2;
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.1);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23657786' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
    width: 100%;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

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

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header .logo {
        max-width: 75px;
    }

    .header-content h1 {
        font-size: 1.5em;
    }

    .header-content p {
        font-size: 0.95em;
    }

    /* Show hamburger menu on mobile */
    .hamburger {
        display: flex;
    }

    /* Hide navigation by default on mobile */
    .page-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        gap: 0;
        z-index: 999;
    }

    .page-nav.active {
        right: 0;
    }

    .page-nav a {
        width: 100%;
        padding: 15px 20px;
        border-radius: 8px;
        margin-bottom: 5px;
    }

    .input-section {
        flex-direction: column;
    }

    #downloadBtn {
        width: 100%;
    }

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

    .features-section h2,
    .faq-section h2 {
        font-size: 1.5em;
    }

    .how-to-section {
        padding: 25px 20px;
    }

    .how-to-section h2 {
        font-size: 1.4em;
    }

    .tutorial-intro > p {
        font-size: 1em;
    }

    .sample-video-box {
        padding: 15px;
    }

    .tutorial-step {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
        margin: 0 auto;
    }

    .step-content h3 {
        font-size: 1.1em;
        text-align: center;
    }

    .step-content p {
        font-size: 0.95em;
    }

    .tutorial-tip {
        padding: 15px 20px;
    }

    .tutorial-tip h4 {
        font-size: 1em;
    }
}

/* Extra small devices (under 480px) - Small phones */
@media (max-width: 479px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 15px;
    }

    .header-container {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    header .logo {
        max-width: 60px;
    }

    .header-content h1 {
        font-size: 1.2em;
        margin-bottom: 8px;
    }

    .header-content p {
        font-size: 0.85em;
    }

    .page-content h2 {
        font-size: 1.4em;
        margin-top: 20px;
        margin-bottom: 12px;
    }

    .page-content h3 {
        font-size: 1.1em;
        margin-top: 15px;
        margin-bottom: 8px;
    }

    .page-content p {
        font-size: 0.95em;
        margin-bottom: 12px;
    }

    .page-content ul, .page-content ol {
        margin-left: 18px;
        margin-bottom: 12px;
    }

    .input-section {
        gap: 8px;
    }

    #tweetUrl {
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 30px;
    }

    #downloadBtn {
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 30px;
    }

    .features-section h2 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    .feature-item {
        padding: 18px;
        border-radius: 12px;
    }

    .feature-item h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }

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

    .how-to-section {
        padding: 15px;
        margin-top: 30px;
    }

    .how-to-section h2 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    .tutorial-intro > p {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    .sample-video-box {
        padding: 12px;
        max-width: 100%;
    }

    .tutorial-step {
        padding: 15px;
        gap: 12px;
        margin-bottom: 30px;
        border-radius: 10px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.1em;
        flex-shrink: 0;
    }

    .step-content h3 {
        font-size: 1em;
    }

    .step-content p {
        font-size: 0.9em;
        margin-bottom: 12px;
    }

    .tutorial-image {
        border-radius: 6px;
        margin: 12px 0 8px;
    }

    .image-caption {
        font-size: 0.85em;
        margin-top: 6px;
    }

    .tutorial-tip {
        padding: 12px 15px;
        margin-top: 20px;
        border-radius: 8px;
    }

    .tutorial-tip h4 {
        font-size: 0.95em;
        margin-bottom: 8px;
    }

    .tutorial-tip p {
        font-size: 0.9em;
    }

    .faq-section h2 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }

    .faq-item {
        padding: 18px;
        margin-bottom: 15px;
        border-radius: 12px;
        border-left-width: 3px;
    }

    .faq-item h3 {
        font-size: 1em;
        margin-bottom: 10px;
    }

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

    .form-group label {
        font-size: 0.9em;
        margin-bottom: 6px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px 14px;
        font-size: 16px;
        border-radius: 6px;
    }

    .form-textarea {
        min-height: 100px;
    }

    .submit-btn {
        padding: 12px 24px;
        font-size: 1em;
        margin-top: 8px;
    }

    footer {
        margin-top: 30px;
        font-size: 0.85em;
    }

    .footer-nav {
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        flex-wrap: wrap;
    }

    .footer-nav a {
        font-size: 0.9em;
    }

    .copyright-disclaimer {
        padding: 15px;
        margin-top: 15px;
        border-radius: 10px;
    }

    .copyright-disclaimer h4 {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .copyright-disclaimer p {
        font-size: 0.9em;
        margin-bottom: 8px;
    }

    .copyright-disclaimer ul {
        margin-left: 18px;
        margin-bottom: 12px;
        font-size: 0.9em;
    }

    .error {
        padding: 15px;
        font-size: 0.9em;
    }

    .last-updated {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

/* Medium phones and tablets (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
    .container {
        padding: 18px;
    }

    .header-content h1 {
        font-size: 1.7em;
    }

    .header-content p {
        font-size: 0.95em;
    }

    .page-content h2 {
        font-size: 1.6em;
        margin-top: 25px;
    }

    .page-content h3 {
        font-size: 1.2em;
    }

    .input-section {
        gap: 10px;
    }

    #tweetUrl {
        padding: 16px 22px;
        font-size: 16px;
    }

    #downloadBtn {
        padding: 13px 32px;
        font-size: 15px;
    }

    .features-section h2 {
        font-size: 1.6em;
    }

    .feature-item {
        padding: 22px;
    }

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

    .how-to-section {
        padding: 30px 18px;
    }

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

    .tutorial-step {
        padding: 25px;
        gap: 18px;
        margin-bottom: 35px;
    }

    .step-number {
        width: 48px;
        height: 48px;
        font-size: 1.2em;
    }

    .step-content h3 {
        font-size: 1.15em;
    }

    .faq-item {
        padding: 22px;
        margin-bottom: 18px;
    }

    .faq-section h2 {
        font-size: 1.6em;
    }

    .footer-nav {
        gap: 16px;
    }

    .copyright-disclaimer {
        padding: 20px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 11px 16px;
        font-size: 16px;
    }

    .form-textarea {
        min-height: 110px;
    }
}
