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

h1 {
    color: white;
    text-decoration: none;
}

#head {
    background: none;
    border: none;
    font-size: 1.5em;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.file-input, .profile-img , .story-section{
    display: none;
}
#customAdjective, #customWordCount, #customSubject {
    display: none;
}
.capture-btn {
    display: none;
    margin-top: 1rem;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.dropdown-toggle:hover {
    background: white;
    color: #2c3e50;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eee;
    display: block;
    width: 100%;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
    width: 100%;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #333;
    color: white;
    opacity: 1;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.calculator {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

.calculator input {
    width: 300px;
    padding: 0.5rem;
    margin: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 1.1rem;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.button-grid .btn {
    grid-column: span 3;
}

.op-btn {
    padding: 0.5rem;
    background: #e9ecef;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.op-btn:hover {
    background: #dee2e6;
}

#result {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.history {
    max-width: 400px;
    margin: 2rem auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.history h3 {
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
}

#history-log {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    border-left: 3px solid #3498db;
}

/* AdSense Styling */
.ad-container {
    margin: 20px 0;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.visualizer-container {
    text-align: center;
    margin: 2rem auto;
}

.controls {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.profile-section {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-picture {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-placeholder {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}
.aspect-ratio-group {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.aspect-ratio-group p, .download-group p {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.aspect-ratio-group label {
    margin: 0 0.5rem;
    display: inline-block;
}

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

.download-group p {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.download-group label {
    margin: 0 0.5rem;
}
/* Mobile Optimizations */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        background: transparent;
        min-width: auto;
    }
    
    main {
        padding: 1rem;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator {
        max-width: 100%;
        padding: 1rem;
    }
    
    .calculator input {
        width: 100%;
        max-width: 280px;
    }
    
    .button-grid {
        max-width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #canvas {
        max-width: 100%;
        height: auto;
    }
    
    .profile-picture {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .calculator input {
        max-width: 250px;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
}
.contact-form {
    max-width: 500px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}
.contact-form select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}
.adsbygoogle {
    display: block;
}
.nav-title {
    color: white;
    text-decoration: none;
}

.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    text-align: center;
}

.auth-form {
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.auth-form input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.auth-divider {
    margin: 1rem 0;
    color: #666;
    font-weight: bold;
}

.oauth-section {
    padding: 1rem;
}

.oauth-btn {
    background: #db4437;
    width: 100%;
}

.oauth-btn:hover {
    background: #c23321;
}

.guest-btn {
    background: #6c757d;
    width: 100%;
    margin-top: 0.5rem;
}

.guest-btn:hover {
    background: #5a6268;
}

.story-generator {
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.story-result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
    border-left: 4px solid #3498db;
}

.story-result h3 {
    margin-bottom: 1rem;
    color: #333;
}

.story-result p {
    line-height: 1.6;
    color: #555;
}

.story-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.story-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.story-controls select,
.story-controls input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.story-text {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    border-left: 4px solid #3498db;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

.error {
    color: #e74c3c;
    background: #fdf2f2;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
}