:root {
    --primary: #0d9488;
    --primary-hover: #0f766e;
    --primary-light: #ccfbf1;
    --secondary: #1e293b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --error: #ef4444;
    --success: #10b981;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.hidden {
    display: none !important;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15,23,42,0.4) 0%, rgba(15,23,42,0.8) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    text-align: center;
    color: #fff;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: -60px auto 0;
    padding: 0 20px 80px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

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

.card-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.card-header p {
    color: var(--text-muted);
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

.input-group {
    margin-bottom: 24px;
    flex: 1;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--secondary);
    font-size: 0.95rem;
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    color: var(--text-main);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: var(--surface);
}

/* File Upload */
.file-upload-wrapper {
    margin-bottom: 24px;
}

.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.drop-icon {
    color: var(--primary);
    margin-bottom: 12px;
}

.drop-text {
    font-weight: 500;
    color: var(--secondary);
}

.hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.preview-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 16px;
    border: 1px solid var(--border);
    background: #000;
}

#image-preview {
    display: block;
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.btn-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 8px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #0f172a;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border);
    color: var(--secondary);
}

.btn-outline:hover {
    border-color: var(--secondary);
    background-color: var(--background);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Messages */
.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background-color: #fef2f2;
    border-left: 4px solid var(--error);
    color: #991b1b;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
}

/* Status Panel */
.status-panel {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin: 0 auto;
}

.status-panel h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 12px;
}

/* Success Section */
.success-card {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #d1fae5;
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.share-panel {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.share-input-group {
    display: flex;
    margin-top: 16px;
    gap: 8px;
}

.share-input-group input {
    margin-bottom: 0;
    background-color: var(--background);
}

/* Gallery Section */
.gallery-container {
    width: 100%;
}

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

.gallery-header h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.gallery-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.gallery-item {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1 / 1;
}

.gallery-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 30px 20px 16px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.gallery-item-author {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.gallery-item-votes {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 99px;
    backdrop-filter: blur(4px);
}

.load-more-container {
    text-align: center;
}

/* Lightbox Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(0,0,0,0.8);
}

.modal-image-container {
    background: #000;
    flex: 1;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.modal-info {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

@media (max-width: 768px) {
    .modal-info {
        flex-direction: column;
        gap: 20px;
    }
    .modal-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

.modal-meta h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--secondary);
}

.modal-meta p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.vote-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.vote-count svg {
    width: 24px;
    height: 24px;
}

.btn-vote {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-vote:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-vote:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-vote.voted {
    background: var(--success);
    color: white;
}

/* Powered By */
.powered-by-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}
