@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000000;
    color: #ededed;
    line-height: 1.6;
    min-height: 100vh;
    padding: 80px 20px;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120, 119, 198, 0.15), transparent);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 64px;
}

.header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 15px;
    color: #a0a0a0;
    font-weight: 400;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

.back-link {
    color: #d0d0d0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.back-link:hover {
    color: #ffffff;
}

.back-link::before {
    content: '←';
    font-size: 14px;
}

.write-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 48px;
    border-radius: 16px;
    margin-bottom: 64px;
    transition: border-color 0.2s ease;
}

.write-section:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.write-section h2 {
    font-size: 24px;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 36px;
    letter-spacing: -0.01em;
}

.author-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.author-selector label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
    font-weight: 500;
    font-size: 14px;
}

.author-selector label:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.author-selector input[type="radio"] {
    margin-right: 10px;
    accent-color: #ffffff;
}

.author-selector label:has(input:checked) {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

textarea {
    width: 100%;
    padding: 18px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    resize: vertical;
    margin-bottom: 24px;
    min-height: 200px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
    color: #ededed;
}

textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

textarea::placeholder {
    color: #606060;
}

.photo-upload {
    margin-bottom: 24px;
}

.photo-label {
    display: inline-block;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #d0d0d0;
    font-weight: 500;
}

.photo-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

#photoPreview {
    margin-top: 20px;
}

#photoPreview img {
    max-width: 320px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.remove-photo-btn {
    margin-top: 12px;
    padding: 8px 20px;
    background: rgba(239, 68, 68, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.remove-photo-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.send-btn {
    width: 100%;
    padding: 16px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.send-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cartas-list {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 48px;
    border-radius: 16px;
    transition: border-color 0.2s ease;
}

.cartas-list:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.cartas-list h2 {
    font-size: 24px;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: -0.01em;
}

.carta-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 36px;
    border-radius: 12px;
    margin-bottom: 28px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.carta-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.carta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.carta-author {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
}

.carta-date {
    font-size: 12px;
    color: #808080;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.carta-message {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 28px;
    white-space: pre-wrap;
    color: #d0d0d0;
}

.carta-photo {
    margin: 28px 0;
}

.carta-photo img {
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carta-photo img:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.01);
}

.carta-reactions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reaction-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.1);
}

.reaction-btn.active {
    background: #ffffff;
    border-color: #ffffff;
}

@media (max-width: 768px) {
    body {
        padding: 50px 20px;
    }

    .header,
    .write-section,
    .cartas-list {
        padding: 36px 28px;
    }

    .header h1 {
        font-size: 36px;
    }

    .author-selector {
        flex-direction: column;
    }

    .carta-item {
        padding: 28px;
    }

    .carta-header {
        flex-direction: column;
        align-items: flex-start;
    }
}