/* Seção do Ticket Gerado */
.ticket-section {
    max-width: 900px;
    margin: 60px auto 0;
    text-align: center;
}

.success-message {
    margin-bottom: 40px;
}

.success-message h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: hsl(0, 0%, 100%);
    margin-bottom: 16px;
    line-height: 1.2;
}

.success-message h2 span {
    background: linear-gradient(135deg, hsl(7, 86%, 67%) 0%, hsl(0, 0%, 100%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-message p {
    font-size: 1.1rem;
    color: hsl(245, 15%, 58%);
    line-height: 1.5;
}

.success-message span {
    color: hsl(7, 88%, 67%);
    font-weight: 700;
}

.ticket-container {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

#ticketCanvas {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    height: auto;
}/* Formulário */
.ticket-form {
    text-align: left;
}/* Reset e configurações base usando assets oficiais do Frontend Mentor */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inconsolata', monospace;
    font-size: 20px;
    background-color: hsl(248, 70%, 10%);
    background-image: url('./assets/images/background-desktop.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    min-height: 100vh;
    color: hsl(0, 0%, 100%);
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

/* Header centralizado */
.header {
    text-align: center;
    margin-bottom: 60px;
}

.logo {
    width: 180px;
    height: auto;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: hsl(0, 0%, 100%);
    margin-bottom: 20px;
    line-height: 1.1;
}

.header p {
    font-size: 1.2rem;
    font-weight: 400;
    color: hsl(245, 15%, 58%);
    margin-bottom: 20px;
}

/* Layout principal - lado a lado */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 40px;
}

/* Form Section */
.form-section {
    background: hsl(0, 0%, 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: hsl(245, 19%, 35%);
    margin-bottom: 30px;
    text-align: center;
}

.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: hsl(245, 19%, 35%);
    margin-bottom: 10px;
}

.input-group input[type="text"],
.input-group input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid hsl(252, 6%, 83%);
    border-radius: 12px;
    font-family: 'Inconsolata', monospace;
    font-size: 18px;
    font-weight: 500;
    color: hsl(245, 19%, 35%);
    background: hsl(0, 0%, 100%);
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: hsl(245, 15%, 58%);
    font-weight: 400;
}

.input-group input:focus {
    outline: none;
    border-color: hsl(7, 88%, 67%);
    box-shadow: 0 0 0 4px hsla(7, 88%, 67%, 0.1);
}

.input-group input.error {
    border-color: #ef4444;
}

.input-group input.success {
    border-color: #22c55e;
}

/* Input com ícone (GitHub) */
.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    z-index: 1;
}

.input-with-icon input {
    padding-left: 50px;
}

/* Upload de Avatar */
.avatar-group {
    text-align: center;
    margin-bottom: 25px;
}

.avatar-upload-container {
    margin: 15px 0;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border: 2px dashed hsl(252, 6%, 83%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
    background: hsl(0, 0%, 100%);
    overflow: hidden;
}

.avatar-preview:hover {
    border-color: hsl(7, 88%, 67%);
    background: hsla(7, 88%, 67%, 0.02);
}

.avatar-preview.has-image {
    border: none;
    border-radius: 12px;
}

.avatar-placeholder {
    text-align: center;
    color: hsl(245, 15%, 58%);
}

.upload-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.avatar-placeholder p {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ticket Preview Section */
.ticket-preview-section {
    background: hsl(0, 0%, 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ticket-preview-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: hsl(245, 19%, 35%);
    margin-bottom: 30px;
}

.ticket-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

#ticketCanvas {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    height: auto;
    background: hsl(248, 70%, 10%);
}

/* Success Section */
.success-section {
    text-align: center;
    margin-top: 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.success-message h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: hsl(0, 0%, 100%);
    margin-bottom: 16px;
    line-height: 1.2;
}

.success-message h2 span {
    background: linear-gradient(135deg, hsl(7, 86%, 67%) 0%, hsl(0, 0%, 100%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-message p {
    font-size: 1.1rem;
    color: hsl(245, 15%, 58%);
    line-height: 1.5;
}

.success-message span {
    color: hsl(7, 88%, 67%);
    font-weight: 700;
}

/* Input hint */
.input-hint {
    font-size: 12px;
    color: hsl(245, 15%, 58%);
    margin-top: 6px;
    text-align: center;
}

/* Mensagens de erro */
.error-message {
    color: #ef4444;
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
    min-height: 20px;
    transition: all 0.3s ease;
}

.error-message:not(:empty) {
    display: block;
}

/* Botões */
.generate-btn,
.download-btn {
    width: 100%;
    padding: 18px 24px;
    background: hsl(7, 88%, 67%);
    color: hsl(0, 0%, 100%);
    border: none;
    border-radius: 12px;
    font-family: 'Inconsolata', monospace;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.generate-btn:hover,
.download-btn:hover {
    background: hsl(7, 71%, 60%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px hsla(7, 88%, 67%, 0.3);
}

.generate-btn:disabled {
    background: hsl(245, 15%, 58%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Seção do Ticket Gerado */
.ticket-section {
    max-width: 900px;
    margin: 60px auto 0;
    text-align: center;
}

.success-message {
    margin-bottom: 40px;
}

.success-message h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: hsl(0, 0%, 100%);
    margin-bottom: 16px;
    line-height: 1.2;
}

.success-message h2 span {
    background: linear-gradient(135deg, hsl(7, 86%, 67%) 0%, hsl(0, 0%, 100%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-message p {
    font-size: 1.1rem;
    color: hsl(245, 15%, 58%);
    line-height: 1.5;
}

.success-message span {
    color: hsl(7, 88%, 67%);
    font-weight: 700;
}

.ticket-container {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

#ticketCanvas {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    height: auto;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: #ef4444;
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    min-width: 320px;
    font-family: 'Inconsolata', monospace;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    animation: slideIn 0.3s ease forwards;
}

.toast.success {
    background: #22c55e;
}

.toast.warning {
    background: hsl(7, 88%, 67%);
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
    }
}

/* Tag da Task */
.task-tag {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(0, 0, 0, 0.8);
    color: hsl(7, 88%, 67%);
    padding: 12px 20px;
    border-radius: 24px;
    font-family: 'Inconsolata', monospace;
    font-size: 16px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsividade */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .ticket-preview-section {
        order: 2;
    }
    
    .form-section {
        order: 1;
    }
}

@media (max-width: 768px) {
    body {
        background-image: url('./assets/images/background-mobile.png');
        font-size: 18px;
    }
    
    .container {
        padding: 20px 16px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .form-section,
    .ticket-preview-section {
        padding: 30px 24px;
    }
    
    .main-content {
        gap: 30px;
    }
    
    .avatar-preview {
        width: 80px;
        height: 80px;
    }
    
    .upload-icon {
        width: 20px;
        height: 20px;
    }
    
    .avatar-placeholder p {
        font-size: 10px;
    }
    
    #ticketCanvas {
        max-width: 100%;
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body {
        background-image: url('./assets/images/background-tablet.png');
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Estados de Acessibilidade */
.input-group input:focus-visible,
.generate-btn:focus-visible,
.download-btn:focus-visible,
.avatar-preview:focus-visible {
    outline: 3px solid hsl(7, 88%, 67%);
    outline-offset: 2px;
}

/* Melhorias de contraste */
@media (prefers-contrast: high) {
    .input-group input {
        border-width: 3px;
    }
    
    .error-message {
        font-weight: 700;
    }
}

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}