* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    padding: 20px;
    color: #e0e0e0;
}

.container {
    text-align: center;
    background: rgba(30, 30, 50, 0.95);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 179, 237, 0.1);
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 179, 237, 0.15);
}

h1 {
    color: #63b3ed;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(99, 179, 237, 0.3);
}

h2 {
    color: #90cdf4;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 500;
}

h3 {
    color: #63b3ed;
    font-weight: 500;
}

#loading {
    margin-bottom: 1.5rem;
    color: #90cdf4;
    font-style: italic;
    font-size: 0.95rem;
    padding: 12px 20px;
    background: rgba(99, 179, 237, 0.1);
    border-radius: 10px;
    display: inline-block;
}

.search-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, rgba(45, 45, 70, 0.8), rgba(35, 35, 55, 0.9));
    border-radius: 16px;
    border: 1px solid rgba(99, 179, 237, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.searchInput {
    padding: 14px 20px;
    width: 100%;
    max-width: 500px;
    border: 2px solid rgba(99, 179, 237, 0.3);
    border-radius: 12px;
    background: rgba(20, 20, 35, 0.8);
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.searchInput::placeholder {
    color: #718096;
}

.searchInput:focus {
    border-color: #63b3ed;
    box-shadow: 0 0 20px rgba(99, 179, 237, 0.2);
    background: rgba(25, 25, 45, 0.9);
}

.searchInput:disabled {
    background: rgba(30, 30, 45, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
}

.searchButton {
    padding: 14px 32px;
    background: linear-gradient(135deg, #4299e1, #63b3ed);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
    width: 100%;
    max-width: 500px;
}

.searchButton:hover:not(:disabled) {
    background: linear-gradient(135deg, #3182ce, #4299e1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.searchButton:active:not(:disabled) {
    transform: translateY(0);
}

.searchButton:disabled {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

#storeResults, #locationResults {
    margin-top: 1.5rem;
    text-align: left;
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #4299e1 #1a1a2e;
}

#storeResults::-webkit-scrollbar, #locationResults::-webkit-scrollbar {
    width: 8px;
}

#storeResults::-webkit-scrollbar-track, #locationResults::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 4px;
}

#storeResults::-webkit-scrollbar-thumb, #locationResults::-webkit-scrollbar-thumb {
    background: #4299e1;
    border-radius: 4px;
}

#storeResults div, #locationResults div {
    background: linear-gradient(145deg, rgba(40, 40, 60, 0.9), rgba(30, 30, 50, 0.95));
    border: 1px solid rgba(99, 179, 237, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

#storeResults div:hover, #locationResults div:hover {
    border-color: rgba(99, 179, 237, 0.4);
    background: linear-gradient(145deg, rgba(50, 50, 75, 0.9), rgba(40, 40, 60, 0.95));
}

#storeResults h3, #locationResults h3 {
    color: #63b3ed;
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

#storeResults p, #locationResults p {
    margin: 0.4rem 0;
    color: #a0aec0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.brief-summary-section {
    background: linear-gradient(145deg, rgba(45, 45, 70, 0.8), rgba(35, 35, 55, 0.9));
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(99, 179, 237, 0.15);
}

.brief-summary-content {
    background: rgba(20, 20, 35, 0.8);
    color: #cbd5e0;
    padding: 1.2rem;
    margin: 1rem 0;
    border-radius: 12px;
    text-align: center;
    min-height: 60px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border: 1px solid rgba(99, 179, 237, 0.1);
    line-height: 1.6;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(145deg, #2d2d45, #252540);
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid rgba(99, 179, 237, 0.2);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

#editSummaryInput {
    width: 100%;
    height: 150px;
    margin: 15px 0;
    padding: 14px;
    box-sizing: border-box;
    background: rgba(20, 20, 35, 0.9);
    color: #e0e0e0;
    border: 2px solid rgba(99, 179, 237, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#editSummaryInput:focus {
    border-color: #63b3ed;
}

.password-input-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
}

#passwordInput {
    width: 100%;
    padding: 14px;
    padding-right: 45px;
    box-sizing: border-box;
    border: 2px solid rgba(99, 179, 237, 0.3);
    background: rgba(20, 20, 35, 0.9);
    color: #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#passwordInput:focus {
    border-color: #63b3ed;
}

.modal button {
    background: linear-gradient(135deg, #4299e1, #63b3ed);
    color: #fff;
    border: none;
    padding: 12px 28px;
    cursor: pointer;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.modal button:hover {
    background: linear-gradient(135deg, #3182ce, #4299e1);
    transform: translateY(-2px);
}

#editBriefSummary {
    display: inline-block;
    margin: 10px auto;
    width: auto;
    padding: 12px 28px;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #718096;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #63b3ed;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #718096;
    font-size: 18px;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #63b3ed;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.modal-content button {
    background: linear-gradient(135deg, #4299e1, #63b3ed);
    color: #fff;
    border: none;
    padding: 12px 28px;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-content button:hover {
    background: linear-gradient(135deg, #3182ce, #4299e1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        padding: 1.5rem;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    .search-section {
        padding: 1.2rem;
    }

    .searchInput, .searchButton {
        width: 100%;
        max-width: none;
    }

    .searchInput {
        padding: 12px 16px;
    }

    .searchButton {
        padding: 12px 24px;
    }

    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
        width: 95%;
    }

    .button-container {
        flex-direction: column;
        gap: 10px;
    }

    .button-container button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.2rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    .brief-summary-section,
    .search-section {
        padding: 1rem;
    }

    #storeResults, #locationResults {
        max-height: 250px;
    }

    #storeResults div, #locationResults div {
        padding: 1rem;
    }
}
