@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Press+Start+2P&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Outfit:wght@100..900&family=Press+Start+2P&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');


*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Outfit", sans-serif;

}


:root {
    --color-primary: #6A9FB5;  /* Soft Muted Blue */
    --color-primary-dark: #547A8C;  /* Deep Slate Blue */
    --color-accent: #A4C3B2;  /* Calm Sage Green */
    --color-card: #F9F9F9;  /* Soft White */
    --color-input: #E8F0F2;  /* Light Aqua */
    --color-text: #2C3E50;  /* Deep Blue Gray */
    --color-placeholder: #7A8C99;  /* Muted Cool Gray */
    --color-border: #D1D9E6;  /* Light Cool Border */
    --color-gradient: linear-gradient(135deg, #6A9FB5, #A4C3B2);
}


  body.dark-theme {
    --color-card: #1C2A35;  /* Deep Navy Blue */
    --color-input: #243A4A;  /* Muted Dark Teal */
    --color-text: #E3E6E8;  /* Soft White */
    --color-placeholder: #B0BCC6;  /* Muted Cool Gray */
    --color-border: #3B4A57;  /* Soft Border */
  
    background: var(--color-card);
    background-image: radial-gradient(circle at 15% 50%, rgba(106, 159, 181, 0.15) 0%, transparent 35%), 
                      radial-gradient(circle at 85% 30%, rgba(164, 195, 178, 0.15) 0%, transparent 35%), 
                      radial-gradient(circle at 50% 80%, rgba(106, 159, 181, 0.1) 0%, transparent 40%);
}


body{
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: space-between;
 min-height: 100vh;
 padding: 15px;
 color: var(--color-text);
 background-image: radial-gradient(circle at 20% 40%, rgba(137, 177, 219, 0.4) 0%, transparent 50%), 
 radial-gradient(circle at 80% 30%, rgba(173, 128, 193, 0.4) 0%, transparent 50%), 
 radial-gradient(circle at 50% 85%, rgba(242, 201, 174, 0.35) 0%, transparent 50%);

}

.container{
    width: 900px;
    padding: 32px;
    position: relative;
    margin-top: 30px;
    margin-bottom: 50px;
    overflow: hidden;
    border-radius: 23px;
    background: var(--color-card);
    box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .container {
      width: 95%;
      max-width: 100%;
    }
}

body.dark-theme .container {
    border: 1px solid var(--color-border);
}



.header {
    width: 100%;
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    
}

.header .logo-wrapper {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header .logo-wrapper .logo{
    height: 55px;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    font-size: 1.35rem;
    flex-shrink: 0;
    border-radius: 15px;
    background: var(--color-gradient);
}

.header .logo-wrapper .logopng{
    color: white;
    height: 28px;
    pointer-events: none;
    user-select: none;
}

.header .logo-wrapper h1 {
    font-family: "Outfit";
    user-select: none;
    letter-spacing: 0.035rem;
    font-size: 2.05rem;
    font-weight: 600;
    opacity: 0.8;
}


.header .theme-toggle {
    height: 43px;
    width: 43px;
    border-radius: 50%;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-placeholder);
    background: var(--color-input);
    border: 1px solid var(--color-border);
    transition: all 0.5s ease;
      
}

.header .theme-toggle:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    
}


.main-content {
    margin: 0px 0 0px;
}

.main-content .prompt-container {
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

.prompt-container .prompt-input {
    width: 100%;
    resize: vertical;
    line-height: 1.6;
    font-size: 1.05rem;
    min-height: 120px;
    padding: 16px 20px;
    color: var(--color-text);
    background: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: 15px;
    transition: all 0.3s ease;
}

@media (max-width: 600px) {
    .prompt-container .prompt-input {
        
        height: 300px; /* Reduce height on small screens */
    }
  }

.prompt-container .prompt-input::placeholder {
    color: var(--color-placeholder);
}
.prompt-container .prompt-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 3px 4px rgba(152, 243, 99, 0.15);
}


.prompt-container .prompt-btn {
    position: absolute;
    right: 15px;
    bottom: 15px;
    height: 45px;
    width: 45px;
    border: none;
    color: #fff;
    font-size: 1rem;
    border-radius: 50%;
    opacity: 0.8;
    background: var(--color-gradient);
    transition: all 0.3s ease;
}
.prompt-container .prompt-btn:hover{
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.main-content .prompt-actions{
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.prompt-actions .select-wrapper {
    
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    
}
.prompt-actions .select-wrapper::after {
    content: "\f187";
    font-family: "Font Awesome 6 Free";
    
    font-weight: 900;
    position: absolute;
    right: 5px;
    top: 50%;
    padding: 10px;
    font-size: 0.9rem;
    
    pointer-events: none;

    background-color: transparent;
    border-radius: 15px;
    transform: translateY(-50%);
}

@media (max-width: 768px) {

    .custom-select {
        opacity: 0;
        pointer-events: auto;
    }
    .prompt-actions .select-wrapper::after {
        
        display: flex;
        align-items: center;
        flex-direction: column;
        left: 0px;
        background-color: #272e2c9c;
    }
}



.prompt-actions :where(.custom-select, .generate-btn){
    cursor: pointer;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 10px;
    background: var(--color-input);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}
.prompt-actions .custom-select {
    width: 100%;
    outline: none;
    height: 100%;
    appearance: none;
    color: var(--color-text);
}

.prompt-actions .custom-select:is(:focus, :hover){
    border-color: var(--color-accent);
    box-shadow: 0 0 8px 5px rgba(102, 233, 157, 0.15);
}

.prompt-actions .generate-btn {
    display: flex;
    gap: 12px;
    margin-left: auto;
    font-weight: 500;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border: none;
    color: #fff;
    background: var(--color-gradient);
}

@media (max-width: 768px) {
    .prompt-actions .generate-btn {
      width: 95%;
      padding: 15px;
    }
}

.prompt-actions .generate-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(109, 40, 217, 0.3);
}

.main-content .gallery-grid:has(.img-card) {
    margin-top: 30px;
}

.main-content .gallery-grid {
    display: grid;
    gap: 15px;
    
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.gallery-grid .img-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 16px;
    background: var(--color-input);
    border: 1px solid var(--color-border);
    transition: all 0.5s ease;
}

.gallery-grid .img-card:not(.loading, .error):hover{
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.gallery-grid .img-card .result-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-grid .img-card:is(.loading, .error) :is(.result-img,.img-overlay) {
    display: none;
}

.gallery-grid .img-card .img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: flex-end;

    opacity: 0;
    pointer-events: none;
    background: linear-gradient(transparent,rgba(0, 0, 0, 0.8));
    transition: all 0.3s ease;
}

.gallery-grid .img-card:hover .img-overlay {
    opacity: 1;
    pointer-events: auto;
}

.gallery-grid .img-card .img-overlay .img-download-btn {
    height: 45px;
    width: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    backdrop-filter: blur(5px);
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.gallery-grid .img-card .img-overlay .img-download-btn:hover{
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.4);
}

.gallery-grid .img-card .status-container {
    display: none;
    padding: 15px;
    gap: 13px;
    flex-direction: column;
    align-items: center;
}
.gallery-grid .img-card:where(.loading, .error) .status-container {
    display: flex;
}
.gallery-grid .img-card.loading .status-container i, .gallery-grid .img-card.error .spinner {
    display: none;
}
.gallery-grid .img-card.error .status-container i {
    font-size: 1.7rem;
    color: #ef4444;
}


.gallery-grid .img-card.loading .spinner {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    animation: spin 0.5s linear infinite;

}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.gallery-grid .img-card .status-text {
    font-size: 0.85rem;
    text-align: center;
    color: var(--color-placeholder);
}


.terms {
    text-decoration: none;
    color: var(--color-text);
}
