body {
    background: url('../img/wallpaper.png') no-repeat top center fixed;
    background-size: cover;
  }

article {
    height: calc(100vh - 42px);  /* Adjusted from 56px to 42px (25% smaller) */
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 24px;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.input-group .form-control:focus {
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    border-color: #ddd;
}

.btn-light {
    padding: 8px 16px;
    border: 1px solid #f8f9fa;
}

.btn-light:hover {
    border: 1px solid #dadce0;
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
}

.search-result {
    padding: 8px 0;
}

header .btn {
    border: 1px solid #c2c2c3;
}

.search-result .title {
    cursor: pointer;
}

.search-result .title:hover {
    text-decoration: underline;
}

search-result .url {
    font-size: 14px;
}

search-result .description {
    font-size: 14px;
    line-height: 1.5;
}

/* When showing results, adjust article height */
article.has-results {
    height: auto;
    align-items: flex-start;
    padding-bottom: 2rem;
}

.result-item {
    cursor: pointer;
    padding: 8px 0;
}

.result-item:hover .result-title {
    text-decoration: underline;
}

.loading-animation {
    text-align: center;
    padding: 40px 0;
}

.loading-animation .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 4px;
    border-radius: 50%;
    background-color: #4285f4;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-animation .dot:nth-child(1) { animation-delay: -0.32s; }
loading-animation .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 
    40% { 
        transform: scale(1.0);
    }
}

.url-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.url-container .bi-lock-fill {
    font-size: 12px;
}

header {
    padding: 0.375rem !important;  /* 25% smaller than 0.5rem */
    margin-right: 100px;
    width: 80%; /* Match guestbook-screen width */
    float: right; /* Align with guestbook-screen */
}

header .btn {
    padding: 0.375rem 0.75rem;  /* 25% smaller padding */
    font-size: 0.875rem;  /* 25% smaller font size */
}

header .form-control {
    height: calc(1.5em + 0.75rem + 2px);  /* 25% smaller input height */
    font-size: 0.875rem;  /* 25% smaller font size */
}

header .bi {
    font-size: 0.875rem;  /* 25% smaller icons */
}

.webmail-login {
    background-color: #f8f9fa;
    min-height: calc(100vh - 42px);
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.webmail-login .card {
    border: none;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.webmail-login .input-group-text {
    background-color: transparent;
    border-right: none;
}

.webmail-login .form-control {
    border-left: none;
}

.webmail-login .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.webmail-login .btn-primary {
    padding: 0.75rem;
}

.webmail-interface {
    background-color: #f8f9fa;
    min-height: calc(100vh - 42px);
    display: flex;
    align-items: flex-start;
    padding: 1rem;
}

.webmail-interface .bg-light {
    border-right: 1px solid #e9ecef;
}

.webmail-interface .btn-danger {
    background-color: #d93025;
    border-color: #d93025;
}

.webmail-interface .btn-danger:hover {
    background-color: #c5221f;
    border-color: #c5221f;
}

.webmail-interface .card {
    width: 100%;
    border: none;
    border-radius: 0;
}

.webmail-interface .card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
}

.webmail-interface .list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
}

.webmail-interface .list-group-item:last-child {
    border-bottom: none;
}

.webmail-interface .btn-outline-secondary {
    border-color: #ced4da;
}

.webmail-interface .btn-outline-secondary:hover {
    background-color: #e9ecef;
}

.webmail-interface .input-group .form-control {
    border-radius: 0;
}

.webmail-interface .input-group .btn-outline-secondary {
    border-radius: 0;
}

.new-message {
    background-color: #e9f7fe;
    font-weight: bold;
}

.full-message {
    margin-top: 10px;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 5px;
}

.full-message .action-icons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.full-message .action-icons .icon {
    cursor: pointer;
    font-size: 16px;
    color: #6c757d;
}

.full-message .action-icons .icon:hover {
    color: #495057;
}

.download-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.progress {
    height: 6px;
    border-radius: 3px;
}

.download-actions {
    display: flex;
    gap: 10px;
}

.alert {
    font-size: 0.875rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* New message visibility and animations */
.message-hidden {
    display: none;
}

.message-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.refresh-spin {
    animation: spin 1s linear;
}

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

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

.list-group-flush {
    position: relative;
}

.refresh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.refresh-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-success {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: #28a745;
    color: white;
    text-align: center;
    font-size: 18px;
    padding: 1.4rem 2rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.login-success.show {
    transform: translateY(0);
}

.login-success i {
    margin-right: 0.5rem;
}

/* Guest Book Styles */
.guestbook-screen {
    background-color: #f8f9fa;
    height: 90vh;
    width: 80%;
    float: right;
    margin-right: 100px;
    padding: 2rem 0;
}

.rating-stars {
    font-size: 1.5rem;
    color: #ccc;
    cursor: pointer;
    display: inline-block;
}

.rating-stars .rating-star {
    margin-right: 5px;
    transition: color 0.2s;
}

.rating-star.hovered,
.rating-star.selected {
    color: #ffc107;
}

.review-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

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

.review-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.review-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.review-content {
    font-size: 0.95rem;
}

.review-submit-success {
    display: none;
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    animation: fadeInOut 4s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* Add a little separation between stars */
.rating-star {
    margin-right: 5px;
}

/* Reviews section toggle */
.reviews-header {
    margin-bottom: 1rem;
}

.reviews-header .btn-link {
    text-decoration: none;
    color: #212529;
}

.reviews-header .btn-link:hover {
    color: #0056b3;
}

.reviews-toggle-icon {
    transition: transform 0.3s ease;
}

.reviews-toggle-icon.rotated {
    transform: rotate(180deg);
}

.reviews-container {
    transition: max-height 0.3s ease;
    overflow: hidden;
}

/* Rating alert styles */
.rating-alert {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    margin-top: 0.25rem;
}

/* Auto-typing toggle adjustments */
.custom-control.custom-switch {
    min-height: 1.5rem;
}

.guestbook-screen .form-group label {
    margin-bottom: 0.5rem;
}

/* Auto-resizing textarea styles */
textarea.form-control {
    transition: height 0.1s ease;
    overflow-y: hidden; /* Hide the scrollbar */
}

/* Add a small bottom padding for better text visibility */
#review-text {
    padding-bottom: 8px;
}
