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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #2d1b4e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a2d6e;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #2d1b4e #0a0a0a;
}

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #1a1a1a;
    background: #0a0a0a;
}

.nav-left {
    font-weight: 500;
    font-size: 0.85rem;
    color: #666;
    letter-spacing: 0.05rem;
}

.nav-center {
    display: flex;
    gap: 3rem;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-link {
    color: #555;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.15s;
    position: relative;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
}

.nav-link:hover {
    color: #888;
}

.nav-link.active {
    color: #c084fc;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 1px;
    background: #9333ea;
}

.x-logo {
    color: #c084fc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    text-decoration: none;
}

.x-logo:hover {
    color: #9333ea;
}

.x-logo svg {
    display: block;
}

/* Container */
.container {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.title {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 0.02rem;
    margin-bottom: 0.3rem;
    color: #aaa;
    text-align: center;
    text-transform: lowercase;
}

.subtitle {
    color: #555;
    font-size: 0.8rem;
    margin-bottom: 2.5rem;
    text-align: center;
    letter-spacing: 0.01rem;
}

/* Proposals Grid */
.proposals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.create-link {
    color: #c084fc;
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid #c084fc;
}

.create-link:hover {
    color: #9333ea;
    border-bottom-color: #9333ea;
}

/* Proposal Card */
.proposal-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.proposal-card:hover {
    border-color: #2d1b4e;
}

.proposal-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #1a1a1a;
}

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

.no-image {
    color: #333;
    font-size: 0.7rem;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
}

.proposal-info {
    padding: 1.2rem;
}

.proposal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #1a1a1a;
}

.proposal-ticker {
    font-size: 1.2rem;
    font-weight: 500;
    color: #888;
    letter-spacing: 0.02rem;
}

.proposal-symbol {
    font-size: 1.5rem;
}

.proposal-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
}

.detail-label {
    color: #555;
    font-size: 0.75rem;
    text-transform: lowercase;
}

.detail-value {
    color: #888;
    font-size: 0.75rem;
}

.detail-value.link {
    color: #c084fc;
    text-decoration: none;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.detail-value.link:hover {
    color: #9333ea;
}

/* Voting Section */
.voting-section {
    margin-top: 1.5rem;
}

.timer {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem;
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    border-radius: 2px;
    margin-bottom: 0.8rem;
}

.timer-label {
    color: #555;
    font-size: 0.7rem;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
}

.timer-value {
    color: #888;
    font-weight: 500;
    font-size: 0.8rem;
}

.votes-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.vote-count {
    padding: 0.75rem;
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    border-radius: 2px;
    text-align: center;
}

.vote-count.yes {
    border-left: 2px solid #4ade80;
}

.vote-count.no {
    border-left: 2px solid #f87171;
}

.vote-label {
    display: block;
    color: #555;
    font-size: 0.65rem;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
    margin-bottom: 0.2rem;
}

.vote-number {
    display: block;
    color: #888;
    font-size: 1.2rem;
    font-weight: 500;
}

.vote-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.vote-btn {
    padding: 0.5rem;
    border: 1px solid;
    background: transparent;
    color: #888;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 2px;
}

.vote-btn.yes-btn {
    border-color: #333;
}

.vote-btn.yes-btn:hover {
    background: #1a1a1a;
    border-color: #4ade80;
    color: #4ade80;
}

.vote-btn.no-btn {
    border-color: #333;
}

.vote-btn.no-btn:hover {
    background: #1a1a1a;
    border-color: #f87171;
    color: #f87171;
}

.vote-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Create Form */
.create-form-container {
    max-width: 1000px;
    margin: 0 auto;
}

.proposal-form {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 2rem;
}

.form-row.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #666;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
}

.label-note {
    color: #666;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: lowercase;
}

.form-input {
    width: 100%;
    padding: 0.6rem;
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    border-radius: 2px;
    color: #888;
    font-size: 0.85rem;
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: #2d1b4e;
    color: #aaa;
}

.form-input.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Image Section */
.image-section {
    display: flex;
    flex-direction: column;
}

.image-upload-area {
    aspect-ratio: 1 / 1;
    background: #0f0f0f;
    border: 1px dashed #1a1a1a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

.image-upload-area.has-image {
    border-style: solid;
}

.image-upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-placeholder {
    text-align: center;
    color: #333;
}

.upload-placeholder svg {
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

.upload-placeholder p {
    font-size: 0.7rem;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
}

.image-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-btn {
    flex: 1;
    padding: 0.5rem;
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    border-radius: 2px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.option-btn input {
    display: none;
}

.option-btn span {
    color: #555;
    font-size: 0.75rem;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
}

.option-btn input:checked + span {
    color: #888;
}

.option-btn:has(input:checked) {
    border-color: #2d1b4e;
    background: #0a0a0a;
}

.secondary-btn {
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid #333;
    border-radius: 2px;
    color: #888;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
}

.secondary-btn:hover {
    background: #1a1a1a;
    border-color: #555;
    color: #aaa;
}

.secondary-btn.small {
    width: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
}

/* Drawing Canvas */
#draw-canvas {
    width: 100%;
    height: 100%;
    background: #fff;
    cursor: crosshair;
}

.draw-controls {
    display: none;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.tool-selector {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    border-radius: 2px;
}

.tool-btn {
    padding: 0.4rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 2px;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background: #1a1a1a;
    color: #888;
}

.tool-btn.active {
    background: #1a1a1a;
    border-color: #2d1b4e;
    color: #c084fc;
}

.tool-btn svg {
    display: block;
}

#draw-color {
    width: 40px;
    height: 30px;
    border: 1px solid #333;
    border-radius: 2px;
    cursor: pointer;
    background: transparent;
}

.brush-size-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    font-size: 0.75rem;
    flex: 1;
}

.brush-size-label span:first-child {
    text-transform: lowercase;
    letter-spacing: 0.02rem;
}

#brush-size {
    flex: 1;
    min-width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #1a1a1a;
    outline: none;
    border-radius: 2px;
}

#brush-size::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #9333ea;
    cursor: pointer;
    border-radius: 50%;
}

#brush-size::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #9333ea;
    cursor: pointer;
    border: none;
    border-radius: 50%;
}

#brush-size-value {
    color: #c084fc;
    font-weight: 600;
    min-width: 20px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 0.65rem;
    background: transparent;
    border: 1px solid #444;
    border-radius: 2px;
    color: #888;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: #1a1a1a;
    border-color: #9333ea;
    color: #c084fc;
}

.submit-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.success-content {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 2.5rem;
    text-align: center;
    max-width: 400px;
}

.success-content svg {
    color: #4ade80;
    margin-bottom: 0.8rem;
    opacity: 0.7;
}

.success-content h3 {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 0.4rem;
    text-transform: lowercase;
    font-weight: 500;
    letter-spacing: 0.02rem;
}

.success-content p {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
}

.success-link {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.02rem;
    transition: all 0.15s;
    font-size: 0.8rem;
}

.success-link:hover {
    background: #1a1a1a;
    border-color: #9333ea;
    color: #c084fc;
}

/* Responsive */
@media (max-width: 968px) {
    .form-row.split {
        grid-template-columns: 1fr;
    }

    .proposals-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-right {
        gap: 1rem;
    }

    .container {
        padding: 2rem 1rem;
    }
}
