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

:root {
    --melt-turquoise: #4ECDC4;
    --melt-lime: #C4D82E;
    --melt-yellow: #FFB74D;
    --melt-orange: #FF9843;
    --melt-orange-dark: #F57C00;
    --bg-light: #FAFAFA;
    --text-dark: #333;
    --text-medium: #666;
    --text-light: #999;
    --border-light: #E0E0E0;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #40BDB8, var(--melt-turquoise), var(--melt-lime), var(--melt-yellow), var(--melt-orange));
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
    position: relative;
}

.hamburger-menu {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 80px;
    left: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 150;
    min-width: 200px;
    overflow: hidden;
}

.dropdown-menu.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item {
    padding: 14px 16px;
    color: var(--text-dark);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

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

.menu-item:hover {
    background: var(--bg-light);
}

.logo {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tagline {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.9;
}

/* Main Content */
.content {
    flex: 1;
    padding: 20px;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Back Button */
.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    color: var(--melt-orange-dark);
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 14px;
}

.back-button:hover {
    opacity: 0.7;
}

/* Friend Card */
.friend-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.friend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.friend-card.overdue {
    border-left: 4px solid var(--melt-orange);
}

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

.friend-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.friend-meta {
    font-size: 12px;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.friend-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag {
    background: var(--melt-turquoise);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.reminder-badge {
    background: var(--melt-orange);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

/* Friend Detail Page */
.friend-detail {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.friend-detail-header {
    background: var(--melt-turquoise);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px var(--shadow);
}

.friend-detail-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.friend-detail-info {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.95;
}

.section {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px var(--shadow);
}

.section-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-subtext {
    font-size: 12px;
    color: var(--text-medium);
    margin-bottom: 16px;
}

/* Planning Space - Idea Card */
.planning-idea-card {
    background: linear-gradient(135deg, rgba(255, 183, 77, 0.1), rgba(255, 152, 67, 0.1));
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    border: 2px solid var(--melt-orange);
    transition: all 0.2s;
}

.planning-idea-card.top-pick {
    border-color: var(--melt-orange);
    background: linear-gradient(135deg, rgba(255, 183, 77, 0.1), rgba(255, 152, 67, 0.1));
}

.planning-idea-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.planning-idea-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.planning-idea-score {
    font-size: 20px;
    margin-left: 8px;
}

.planning-idea-meta {
    font-size: 12px;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.planning-idea-description {
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.rating-section {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.rating-column {
    flex: 1;
    text-align: center;
}

.rating-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.rating-display {
    font-size: 24px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
}

.rating-display:hover {
    transform: scale(1.1);
}

.rating-text {
    font-size: 11px;
    color: var(--text-medium);
    margin-top: 4px;
}

/* Rating Picker Modal */
.rating-picker {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    box-shadow: 0 -4px 20px var(--shadow);
    z-index: 1001;
    animation: slideUp 0.3s ease-out;
}

.rating-picker.active {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.rating-picker-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.rating-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-light);
}

.rating-option:hover {
    background: rgba(78, 205, 196, 0.12);
    transform: translateX(4px);
}

.rating-emoji {
    font-size: 32px;
}

.rating-option-text {
    flex: 1;
}

.rating-option-value {
    font-weight: 700;
    color: var(--melt-orange-dark);
}

.rating-option-label {
    font-size: 14px;
    color: var(--text-dark);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px var(--shadow);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-secondary {
    background: white;
    color: var(--melt-orange-dark);
    border: 2px solid var(--melt-orange);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background: #ccc !important;
    color: #666 !important;
}

.btn-delete {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--melt-orange);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.3s;
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-medium);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Top Picks Banner */
.top-picks-banner {
    background: linear-gradient(135deg, var(--melt-orange), var(--melt-yellow));
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
}

.icon-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.icon-action-btn:hover {
    background: rgba(255, 152, 67, 0.1);
}

.icon-action-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--melt-orange-dark);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-action-label {
    font-size: 10px;
    color: var(--text-medium);
    font-weight: 500;
}

/* Share dropdown */
.share-dropdown-container {
    position: relative;
    flex: 1;
}

.share-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 -4px 12px var(--shadow);
    margin-bottom: 8px;
    overflow: hidden;
    z-index: 10;
}

.share-dropdown.active {
    display: block;
    animation: slideUpFade 0.2s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-option {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
    font-size: 12px;
}

.share-option:last-child {
    border-bottom: none;
}

.share-option:hover {
    background: var(--bg-light);
}

.share-option-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.share-option-desc {
    font-size: 10px;
    color: var(--text-medium);
}

/* Proposed times list */
.proposed-time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(78, 205, 196, 0.12);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.proposed-time-text {
    font-weight: 600;
    color: var(--text-dark);
}

.remove-time-btn {
    background: none;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.remove-time-btn:hover {
    color: #f44336;
}

/* Time sensitivity badges */
.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.time-badge.urgent {
    background: #ff6b6b;
    color: white;
}

.time-badge.soon {
    background: #ffb347;
    color: #333;
}

.time-badge.scheduled {
    background: rgba(78, 205, 196, 0.2);
    color: var(--melt-turquoise);
}

.time-badge.expired {
    background: #e0e0e0;
    color: #999;
}

.planning-idea-card.expired {
    opacity: 0.5;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.6;
}

.icon-btn-large {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 26px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.6;
}
.icon-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* ===== Archived Hangs Section ===== */
.archived-hangs-section {
    margin: 20px 0 8px;
    border-radius: 8px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.archived-hangs-summary {
    list-style: none;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.archived-hangs-summary::-webkit-details-marker {
    display: none;
}

.archived-hangs-summary::after {
    content: '▸';
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s;
}

details[open] .archived-hangs-summary::after {
    transform: rotate(90deg);
}

.archived-hangs-list {
    padding: 0 16px 12px;
}

.archived-hang-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.archived-hang-title {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.archived-hang-meta {
    font-size: 12px;
    color: var(--text-medium);
}
