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

:root {
    --hero-color: #ec4899;
    --hero-hover: #db2777;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
}

header {
    background: #252525;
    border-bottom: 1px solid #333;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--hero-color);
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: #999;
    font-weight: 500;
    font-size: 0.9rem;
}

nav a:hover, nav a.active {
    color: #fff;
}

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

.empty-message {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Landing Page */
.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.hero p {
    font-size: 1.25rem;
    color: #999;
    margin-bottom: 2rem;
}

.hero-highlight {
    color: var(--hero-color);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--hero-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
}

.cta-button:hover {
    background: var(--hero-hover);
}

.cta-secondary {
    background: transparent;
    border: 1px solid #333;
    color: #e0e0e0;
}

.cta-secondary:hover {
    background: #252525;
    border-color: #444;
}

/* Projects List */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.projects-header h2 {
    font-size: 2rem;
    font-weight: 600;
}

.btn {
    padding: 0.75rem 1.5rem;
    background: var(--hero-color);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
}

.btn:hover {
    background: var(--hero-hover);
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-box {
    background: #252525;
    border: 1px solid #333;
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
}

.project-box.clickable {
    cursor: pointer;
}

.project-box.clickable:hover {
    background: #2a2a2a;
}

.project-box.clickable input,
.project-box.clickable textarea,
.project-box.clickable button {
    cursor: auto;
}

.create-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid #555;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.create-icon:hover {
    border-color: var(--hero-color);
    color: var(--hero-color);
    background: rgba(236, 72, 153, 0.1);
}

.create-icon.has-content {
    color: var(--hero-color);
}

.project-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.save-icon,
.delete-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid #555;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.save-icon:hover,
.delete-icon:hover {
    border-color: var(--hero-color);
    color: var(--hero-color);
    background: rgba(236, 72, 153, 0.1);
}

.save-icon.has-changes {
    color: var(--hero-color);
}

.create-icon svg {
    width: 16px;
    height: 16px;
}

.save-icon svg,
.delete-icon svg {
    width: 16px;
    height: 16px;
}

.save-icon::after,
.delete-icon::after {
    content: attr(title);
    position: absolute;
    top: 50%;
    right: calc(100% + 0.5rem);
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid #333;
}

.save-icon:hover::after,
.delete-icon:hover::after {
    opacity: 1;
}

.create-icon::after {
    content: attr(title);
    position: absolute;
    top: 50%;
    right: calc(100% + 0.5rem);
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid #333;
}

.create-icon:hover::after {
    opacity: 1;
}

.project-name-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: inherit;
    outline: none;
}

.project-name-input::placeholder {
    color: #555;
}

.project-desc-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #a1a1aa;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    height: 2rem;
    outline: none;
    margin-bottom: 0;
}

.project-desc-input::placeholder {
    color: #555;
}

.btn-link {
    color: var(--hero-color);
    text-decoration: none;
    font-size: 1rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Project Detail */
.project-header {
    background: #252525;
    border: 1px solid #333;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    position: relative;
}

.project-description {
    color: #999;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.issues-list {
    background: #252525;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
}

.issue-item {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: background 0.2s;
}

.issue-item:hover {
    background: #2a2a2a;
}

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

.new-post-item {
    position: relative;
}

.new-post-item:hover {
    background: #252525;
}

.new-post-item .create-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid #555;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.new-post-item .create-icon:hover {
    border-color: var(--hero-color);
    color: var(--hero-color);
    background: rgba(236, 72, 153, 0.1);
}

.new-post-item .create-icon.has-content {
    color: var(--hero-color);
}

.new-post-item .create-icon::after {
    content: attr(title);
    position: absolute;
    top: 50%;
    right: calc(100% + 0.5rem);
    transform: translateY(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid #333;
}

.new-post-item .create-icon:hover::after {
    opacity: 1;
}

.post-title-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: inherit;
    outline: none;
}

.post-title-input::placeholder {
    color: #555;
}

.post-content-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #999;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    height: 4rem;
    outline: none;
    line-height: 1.5;
}

.post-content-input::placeholder {
    color: #555;
}

.vote-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 3rem;
    height: 3rem;
    border: 1px solid #333;
    border-radius: 4px;
    background: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-box:hover {
    border-color: var(--hero-color);
}

.vote-arrow {
    width: 16px;
    height: 16px;
    color: #999;
    transition: color 0.2s;
}

.vote-box.voted .vote-arrow {
    color: var(--hero-color);
}

.vote-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e4e4e7;
}

.issue-content {
    flex: 1;
}

.issue-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e4e4e7;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.issue-description {
    font-size: 0.95rem;
    color: #999;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.issue-comments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #71717a;
    margin-left: auto;
}

.comment-icon {
    width: 16px;
    height: 16px;
    color: #71717a;
}

footer {
    border-top: 1px solid #333;
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    color: #666;
    font-size: 0.9rem;
}

footer a {
    color: #999;
    text-decoration: none;
}

footer a:hover {
    color: var(--hero-color);
    text-decoration: underline;
}
