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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #4a4a4a;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5eb 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animated gradient header */
header {
    background: linear-gradient(-45deg, #ff9a56, #ffb347, #ff6b6b, #feca57);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    padding: 2.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(255, 154, 86, 0.3);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

header h1 a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

header h1 a:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.logo-letter {
    display: inline-block;
    animation: 2s ease-in-out infinite;
}

.logo-g  { animation-name: bounce-g; }
.logo-i  { animation-name: bounce-i; animation-delay: 0.05s; }
.logo-r  { animation-name: bounce-r; animation-delay: 0.1s; }
.logo-a  { animation-name: bounce-a; animation-delay: 0.15s; }
.logo-f1 { animation-name: bounce-f1; animation-delay: 0.2s; }
.logo-f2 { animation-name: bounce-f2; animation-delay: 0.25s; }
.logo-e  { animation-name: bounce-e; animation-delay: 0.3s; }

@keyframes bounce-g {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
@keyframes bounce-i {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes bounce-r {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes bounce-a {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes bounce-f1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes bounce-f2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes bounce-e {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.logo-codes {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.1em 0.4em;
    border-radius: 6px;
    margin-left: 0.1em;
    letter-spacing: 0.05em;
    font-size: 0.9em;
}

header p {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}

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

.content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(255, 154, 86, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(255, 154, 86, 0.18);
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #888;
    background: white;
    margin-top: auto;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #ff9a56, #ffb347, #ff6b6b, #feca57) 1;
}

footer nav {
    margin-bottom: 1rem;
}

footer nav a {
    color: #ff8c42;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

footer nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff9a56, #ff6b6b);
    transition: width 0.3s ease;
}

footer nav a:hover {
    color: #ff6b6b;
}

footer nav a:hover::after {
    width: 100%;
}

/* Blog styles */
.content h2 {
    color: #ff8c42;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

.blog-post {
    margin-bottom: 2rem;
}

.blog-post h1 {
    color: #3d3d3d;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-date {
    color: #ffb347;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.blog-post h2 {
    color: #ff8c42;
    font-size: 1.4rem;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #fff0e5;
}

.blog-post p {
    margin-bottom: 1rem;
}

.blog-post ol, .blog-post ul {
    margin: 1rem 0 1rem 1.5rem;
}

.blog-post li {
    margin-bottom: 0.5rem;
}

.blog-post li::marker {
    color: #ffb347;
}

.blog-post hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, #fff0e5, #ffb347, #fff0e5);
    margin: 2rem 0;
    border-radius: 2px;
}

.blog-post blockquote {
    border-left: 4px solid #ffb347;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
    background: #fffbf7;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.blog-post strong {
    color: #3d3d3d;
}

.blog-post a {
    color: #ff8c42;
    text-decoration: none;
    border-bottom: 1px dashed #ffb347;
    transition: all 0.3s ease;
}

.blog-post a:hover {
    color: #ff6b6b;
    border-bottom-style: solid;
}

/* Fun placeholder for homepage */
.placeholder-message {
    color: #ff8c42;
    font-size: 1.8rem;
    font-weight: 600;
    padding: 1rem 0;
}

/* Smooth transitions for everything */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Selection styling */
::selection {
    background: #ffb347;
    color: white;
}

/* Code grid styles */
.code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.code-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(255, 154, 86, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.code-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(255, 154, 86, 0.2);
}

.code-card.highlight {
    grid-column: 1 / -1;
    background: linear-gradient(-45deg, #ff9a56, #ffb347, #ff6b6b, #feca57);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.highlight-image {
    width: 120px;
    height: auto;
    flex-shrink: 0;
}

.highlight-content {
    flex: 1;
}

.code-card.highlight .code-value {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.code-card.highlight .code-description {
    color: rgba(255, 255, 255, 0.95);
}

.code-value {
    display: inline-block;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    background: rgba(255, 154, 86, 0.15);
    color: #ff8c42;
    padding: 0.4em 0.8em;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

a.code-value:hover {
    background: rgba(255, 154, 86, 0.25);
    transform: scale(1.05);
}

.code-card.highlight a.code-value:hover {
    background: rgba(255, 255, 255, 0.35);
}

.code-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.code-card h3 {
    color: #3d3d3d;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.code-card.highlight h3 {
    color: white;
}

.code-card.submit {
    grid-column: 1 / -1;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    text-align: center;
    padding: 2rem;
}

.code-card.submit h3 {
    color: #666;
}

.code-card.submit p {
    color: #888;
    margin-bottom: 1rem;
}

/* Page header - used on service and form pages */
.page-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.page-header h2 {
    color: #3d3d3d;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #888;
}

/* Content card without hover effect */
.content.no-hover:hover {
    transform: none;
}

/* Form styles */
.site-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #3d3d3d;
    font-weight: 500;
}

.form-group label .optional {
    color: #888;
    font-weight: normal;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffb347;
    box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.2);
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
    accent-color: #ff8c42;
}

.checkbox-group .checkbox-label {
    flex: 1;
}

.checkbox-group .checkbox-label span {
    display: block;
    color: #3d3d3d;
    font-weight: 500;
}

.checkbox-group .checkbox-label small {
    color: #888;
    font-size: 0.85rem;
}

/* Primary button */
.btn-primary {
    display: inline-block;
    background: linear-gradient(-45deg, #ff9a56, #ffb347);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 154, 86, 0.4);
}

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

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

/* Disclaimer */
.disclaimer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

/* Service grid and cards */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    aspect-ratio: 1;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(255, 154, 86, 0.1);
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 3px solid #ffb347;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(255, 154, 86, 0.2);
}

.service-card-title {
    color: #3d3d3d;
    font-size: 1.1rem;
    padding: 0.5rem 1rem 0.25rem;
    width: 100%;
    background: white;
}

.service-card-image {
    flex: 1;
    width: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.service-card-description {
    color: #888;
    font-size: 0.85rem;
    padding: 0.25rem 1rem 0.5rem;
    width: 100%;
    background: white;
}

/* Submit card */
.submit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(255, 154, 86, 0.1);
    text-align: center;
    border: 3px dashed #ffb347;
    overflow: hidden;
}

.submit-card h3 {
    color: #3d3d3d;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.submit-card p {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.submit-card .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Error page */
.error-image {
    display: block;
    max-width: 280px;
    margin: 1.5rem auto;
}

.error-actions {
    text-align: center;
    margin: 2rem 0;
}

/* Referral info tooltip */
.code-card.highlight {
    position: relative;
}

.referral-info {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
}

.info-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: help;
    transition: background 0.3s ease;
}

.info-icon:hover {
    background: rgba(255, 255, 255, 0.5);
}

.info-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    color: #4a4a4a;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    width: 280px;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
}

.info-popup::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 10px;
    border: 8px solid transparent;
    border-bottom-color: white;
}

.info-icon:hover + .info-popup,
.info-popup:hover {
    opacity: 1;
    visibility: visible;
}

.info-popup strong {
    color: #ff8c42;
}

a.code-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* FAQ Section */
.faq-section {
    margin-top: 3rem;
    text-align: left;
}

.faq-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Responsive service grid */
@media (max-width: 600px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        aspect-ratio: auto;
    }

    .service-card-image {
        flex: none;
        height: 120px;
    }
}
