/* Contract Summarizer - Professional Styles */
/* Author: AI Assistant */
/* Date: 2026-03-29 */

/* Global Styles */
body {
    font-family: 'Google Sans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 25%, #fecfef 50%, #a18cd1 75%, #fbc2eb 100%);
    overflow: hidden;
    color: #333;
    position: relative;
    cursor: default;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

body:hover::before {
    opacity: 1;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left {
    font-size: 24px;
    font-weight: bold;
}

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

.settings-btn, .profile-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    font-size: 18px;
}

.settings-menu {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(204, 204, 204, 0.5);
    padding: 10px;
    top: 40px;
    right: 50px;
    z-index: 1000;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.settings-menu.show {
    display: block;
}

/* Theme Toggle Slider */
.theme-setting {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.theme-setting label {
    margin: 0;
    font-weight: bold;
    color: #333;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4a1a6f 0%, #2a0845 100%);
}

.toggle-switch input:checked + .toggle-slider::before {
    left: 28px;
}

.toggle-label {
    min-width: 45px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.top-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    margin-top: 20px;
}

/* Button Styles */
.action-btn, .primary-btn, .history-btn, .save-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0; /* Square shape */
    padding: 40px 20px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.action-btn::before, .primary-btn::before, .history-btn::before, .save-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before, .primary-btn:hover::before, .history-btn:hover::before, .save-btn:hover::before {
    left: 100%;
}

.action-btn:hover, .primary-btn:hover, .history-btn:hover, .save-btn:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
}

.primary-btn {
    width: 200px;
    height: 200px;
    font-size: 48px;
    margin-bottom: 0;
}

.primary-btn::after {
    content: "Create New Summary";
    display: block;
    font-size: 14px;
    margin-top: 10px;
}

/* History Section */
.history-section {
    margin-top: 40px;
    width: 100%;
    max-width: 1000px;
}

/* Footer Styles */
footer {
    background: rgba(248, 249, 250, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(224, 224, 224, 0.5);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content {
    flex: 1;
}

.footer-hide-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.footer-hide-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    margin: 0 10px;
    text-decoration: none;
    color: #4285f4;
}

.quote {
    margin-top: 10px;
    font-style: italic;
    color: #666;
}

/* Summary Cards */
.summary-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.summary-card h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
}

.summary-card p {
    margin: 0 0 10px 0;
    color: #666;
    line-height: 1.4;
}

.summary-card small {
    color: #999;
    font-size: 12px;
}

/* More Button */
.more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    position: relative;
}

.large-modal {
    max-width: 900px;
    max-height: 85vh;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.modal h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

/* Summary Modal Styles */
#summaryInput {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 20px;
}

#summaryInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.modal-btn-secondary {
    background: linear-gradient(135deg, #34a853 0%, #2d8659 100%);
}

/* Resources Panel Styles */
.resources-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 350px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.resources-panel.hidden {
    display: none !important;
}

.resources-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resources-header h3 {
    margin: 0;
    color: #333;
}

.panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.panel-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.resources-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.upload-section, .link-section {
    margin-bottom: 20px;
}

.upload-section label, .link-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

#fileUpload {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

#linkInput {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
}

#linkInput:focus {
    outline: none;
    border-color: #667eea;
}

.upload-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-weight: bold;
}

.resources-list {
    margin-top: 20px;
}

.resource-item {
    background: rgba(102, 126, 234, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.resource-name {
    font-weight: bold;
    color: #333;
    word-break: break-all;
}

.resource-size {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.resource-delete {
    background: rgba(234, 67, 53, 0.2);
    border: 1px solid #ea4335;
    color: #ea4335;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.resource-delete:hover {
    background: #ea4335;
    color: white;
}

/* Recent Work Styles */
.recent-work-list {
    display: grid;
    gap: 20px;
}

.recent-work-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recent-work-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    transform: translateY(-2px);
}

.recent-work-item h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.recent-work-item .preview {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.view-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}